When you buy call or put option you pay a premium or bet as to stock will move up(in case of call option) or move down (in case of put option). In case of buying option all that is at stake is premium you pay while return can be unlimited. Only constraint is time limit. Stock need to reach beyond strike price before expiry date.
Writing OptionWhen you write a call option, you are player banker to someone betting that the price of a stock is going down or vice versa in case of put option.. You receive the "bet" in the form of the options premium earned form the person buying the put options from you. If the stock fails to exceed the strike price of the put options by expiration, the buyer has lost the bet and you keep the "bet" money as profit. In this case, your profit is limited to the "bet" money or options premium you received for selling the put options. While risk can be unlimited.