The economic effect of a CFD from your point of view is very close to the effect of owning the stock. If the stock goes up, you make money. If it goes down you lose money. If it pays a dividend, you get that dividend.
You'll typically pay commission for buying and selling the CFDs in a similar way to the commission on stock purchases, though one of the advertised advantages of CFDs is that the commission will be lower.
They also often have tax advantages, for example in the UK you don't have to pay stamp duty on CFDs.
In theory you are exposed to credit risk on the CFD issuer, which you aren't with the real stocks: if the issuer goes bankrupt, you may lose any money you have invested regardless of how well the stock has performed.
It's certainly similar to a bet, but not much more so than investing directly in the stock. In practice the issuer of the CFDs is likely to hedge its own exposure by actually buying the underlying stocks directly, but they can aggregate across lots of contracts and they would tolerate some unhedged exposure to the stock, so they can cut down on the transaction fees.
You also won't get the same voting rights as the underlying stock would grant you.