You sell the option to buy the stock at a given price some time down the road. If the stock doesn’t move, and the price is above the market price, they don’t buy it, or ‘exercise’ the option. Then you’ve made a little extra money.
If the market price does go above the agreed upon ‘strike’ price, then they will buy, and you’ve sold your stock at the guaranteed price.