A CFD is a contract with a broker to swap the difference in an asset's price between opening and closing a trade — you never own the underlying.
CFDs make it easy to go long or short with leverage across many markets. That flexibility is also why they are risky: most retail CFD accounts lose money, and regulators require prominent risk warnings.