Stock option contract conferred the right on contract holder to buy or sell shares at a fixed price at a future date.
Person who buys options is required to pay a certain amount of money (i.e. Premium) in order to acquire this right. Person who writes options can receive premium.
Option holder can choose to exercise (or unexercise) on any trading day up to and including the Last Exercise Day for Options Contracts. Option writer is obliged to honour the contract whenever the option holder chooses to exercise the contract. For this reason, option holder needs to pay for the premium to option writer, and option writer needs to pay a certain amount of money (i.e. margin) to ensure that they can meet the obligations on or before the expiry day.