Derivatives can be an option, swap or forward contract (there are probably others but these are what I recall).
Suppose the current price of gold is $1500 per ounce and you believe in 3 months time it will increase by $50 so you can enter a forward contract with someone such that you will sell an oucne of gold to them for $1550 to make a $50 profit. This is a speculative move. Also, you would have to buy the gold right now at $1500 so you have the gold to sell.
For hedging it would be something like you need gold for your business and you need to sell whatever you produce for $1600. Since the price of gold will fluctuate and you can make a loss, you would enter a forward contract that allows you to purchase gold for $1500 in the future. As such you've hedged the market risk.
That's the general idea, but I may have gotten some details wrong. Hope it helps