Regular assignment/exercise – The settlement price of an option is the official closing price at the end of the day on its expiry. The closing price of the stock on expiry establishes which options are in the money and subject to auto-exercise/assignment. Any option that’s in the money on the expiration date is automatically exercised unless the option owner specifically requests to not exercise. After-hours movement in the stock does not affect the settlement price but it may affect do not exercise notices (example, a stock closes at 100.50, after hours drops to 95 on news, the owner of a 100 call may submit a do not exercise notice to avoid owning stock for $100)
Early assignment/exercise – For a variety of reasons the holder of an option may want to exercise the contract early, before expiry. This is typically done when the option is at or close to 100 deltas and in the money. The reason for that is the holder immediately gives up any extrinsic time value of the option and simply converts the intrinsic value of their option to stock.
With multi leg option spreads, an early assignment of a short leg converts the trade to a complex position consisting of stock and options. The risk profile of the trade itself does not dramatically change after early assignment but the margin or required capital often does and therefore action is typically taken by the trader, either through early exercise or closing the position.