If you do not square off your overnight carry forward positions of options on the expiry day then the position will be settled at a price determined by the exchange. The difference between your entry and the settlement prices will be credited or debited in your trading account ledger.
Points to be remembered:
All the ITM Stock Options contracts will come under the Physical Settlement of derivatives. For details on the physical settlement, refer to this blog.
All the OTM options contracts will be settled at Zero.