A random obligation that falls on the option seller when the right is exercised: Short Put → you must buy 100 shares at the strike. Short Call → you must sell 100 shares. OCC (the Options Clearing Corporation) assigns it randomly among sellers.
What assignment is
Assignment (Assignment) is the moment an option seller is obligated to deliver. The holder exercised the right, and the clearinghouse picked a seller (randomly among eligible writers) to deliver the shares (a short call) or take them (a short put) at the strike price.
When it happens
Certain at expiration for any contract that closes in the money by even a cent (automatic exercise), and sometimes early under American-style options. The usual cause is a cash dividend before expiration that makes exercising a deep in-the-money call profitable for the holder, so the covered seller loses the shares and the dividend together.
Not a disaster, just the contract coming due
For a covered or cash-secured seller, assignment is the scenario already priced in: delivering shares at a price you accepted, or receiving them at a price you wanted. Panic about it is a sign the obligation was sold without being understood, not that the system betrayed you.
Hypothetical example
A cash-secured put seller with a $50 strike found five hundred shares in the account on Monday morning after Friday closed at $48.60. That is the contract working as written. The actual cost is $50 less the premium collected, and the plan moves to its next phase (selling covered calls or holding).
Common mistake
Carrying short in-the-money contracts into expiration Friday to "grab the last cents" of time value. Those last cents are paid for with the certainty of assignment and the risk of a Monday gap. Closing or rolling before the end is what experienced sellers do.
Where to see it on the platform
The education pages explain how it works and how to size the risk, and expiration alerts remind you of exposed positions near expiry.