There are two scenarios which could occur if a long option is taken to expiration. If the option is out-of-the-money at expiration and you do not choose to exercise it, the option will expire worthless, and your losses will consist of the premium that was paid to acquire the option. If the option is in-the-money at expiration by 0.01 or more, it will be automatically exercised on your behalf (unless you previously chose to lapse the option) by the Options Clearing Corporation (OCC). The OCC processes monthly expiration options on the third Saturday of the month, or the day after Friday expiration. The resulting long or short position will be put into the account, effective on the Friday trade date. If the account has sufficient margin to satisfy the requirement on the resulting position, it will then be up to the account holder to decide what they want to do with the position. If the resulting position causes a margin deficit, the account will be subject to liquidation at a time which is defined by the holdings within the account. Please be aware that any positions could be liquidated as a result of the account being in margin violation—the liquidation is not confined to only the shares that resulted from the option position. For example, if the account holds currency, futures, future options positions or and non-USD product, the account may begin to liquidate to meet the margin deficit as soon as a corresponding market opens.
Account holders should refer to the Characteristics and Risks of Standardized Options disclosure document which is provided by IBKR to every option eligible client at the point of application and which clearly spells out the risks of assignment. This document is also available online at OCC's web site.