Option assignment happens when the buyer exercises their contract and the writer is selected to fulfil the obligation. For a Short Position call, you must deliver 100 shares at the strike price. For a short put, you’re required to buy 100 shares at the strike. Assignment usually occurs automatically if the option is in the money at expiration, though it can happen early for deep-in-the-money contracts or around ex-dividend dates.
Covered call writers often treat assignment as one possible exit. If the stock closes above the strike, the shares are sold and the position ends. Plan ahead so you have the shares or capital needed if assignment happens. See Covered Call for background on the strategy.