Derivatives exist to let one party transfer a specific risk to another party, and everything else about them follows from that purpose. A wheat farmer who wants certainty about the price they'll receive at harvest and a food processor who wants certainty about the price they'll pay can enter into a futures contract that fixes that price now, transferring the risk of the market moving between them. An airline worried about jet fuel prices rising can hedge that exposure with a derivative built on oil, without ever taking delivery of a barrel of it. That hedging use is the original economic justification for the whole category, and it is real: derivatives let risk be shifted from someone who does not want to bear it to someone willing to take it on for a price.
The identical instrument, used the other way, is speculation rather than hedging, and the contract itself cannot tell the difference. An investor with no wheat to sell and no bread to bake can buy the same wheat futures contract purely on a view that the price will rise. Nothing about the contract's terms changes based on the buyer's motive; what changes is whether the position offsets an existing exposure (hedging) or creates a new one (speculation). Both uses are legitimate and both carry the same mechanical risks.
Leverage is close to universal across the category, and it is what makes derivatives riskier than the underlying they are built on. Because many derivatives require only a deposit or a premium rather than the full value of the underlying, a given amount of money controls a much larger position than buying the underlying outright would allow. That magnifies percentage gains and losses alike, and in contracts like futures that obligate rather than merely permit a future transaction, losses can exceed the amount originally put up. Our page on leverage in investing covers that mechanism in general; the specific ways it shows up in each derivative type are covered on that instrument's own page.
Counterparty risk is the second layer of risk sitting on top of whatever the underlying does, and it depends heavily on where the contract trades. A derivative traded on a regulated exchange is typically guaranteed by a clearing house standing between the two sides, which our page on the clearing house describes; that arrangement substantially reduces the risk that the other party fails to perform. A derivative negotiated privately between two parties off an exchange carries the risk that the other party cannot or will not honor the contract when it comes due, a risk that exchange trading is specifically designed to remove.
The main families are named and covered on their own pages, because each has distinct mechanics that a general definition cannot usefully carry. An option, covered on our page for the options contract and in more depth on the call option and put option, gives one side a right without an obligation. A futures contract, covered on its own page, obligates both sides to transact at a set price on a set date and is standardized and exchange-traded. A forward contract is a futures contract's private, non-standardized cousin, negotiated directly between two parties rather than on an exchange. A swap exchanges one stream of payments for another, most commonly a fixed interest rate for a floating one, between two parties. This page describes what all of them have in common; each of their specific mechanics belongs on its own page.