CFDs are legally binding contracts where you agree a pricing method for a Contract Unit (CU) and then "purchase" a specified number of CUs.
The pricing method is usually the public price with a few fudge factors such as a buy and sell spread.
A Contract Unit can be a share, a commodity or an index, I refer to them as Contract Units as you are not buying, and in many cases such as a index can not buy, the underlying item.
When you exit the contract you are owed or owe the difference between the "entry" and the "exit" prices.
The typical duration of a CFD will be for a day or a few days they are never medium or long term investments and 4-10 weeks is normally quoted as the upper limit. IG Group did some research and apparently in the UK the average is 3 days but in Singapore it is 25 days.
You never own anything except a contractual obligation.
So far so good, I get it, I have got a possible profit or loss but don't actually own anything, so what's the point?
I can buy shares directly or invest in funds that track indexes or commodities.
If you are asking this then you are on the first step in understanding the danger.
For most retail investors there would be no point, so in order to be able to sell CFDs the platform will offer Leverage, this is another way of saying will will lend you money to buy shares etc..
Because there are no assets actually being bought Leverage (credit) allows the CFD platform to offer to sell you more than you have the money for. Just how many more depends upon how much risk they want to take and more recently what the regulators will allow.
Typically you may be able to buy 5-20 times the number of CUs than you could buy if you were actually buying the underlying share.