It is a right a seller grants a buyer to buy real estate within a certain period of time. For example, suppose you are interested in buying an office building but want more time to investigate the cash flow and compare this building to others in your area. You might offer to pay the owner an option fee to tie up the property. In return, the owner might be willing to grant you the right to buy the building within a certain period (say, six months) at a stated price. The owner would not be able to sell to anyone else in meantime.
You could agree that all or part of the option fee would apply toward the purchase if you decided to actually purchase the property. If you did not exercise your option, you would forfeit your option fee.