The exchange lowers the previous close by the dividend for the purpose of computing the day's change, and data vendors adjust historical prices the same way. This is why a long-run chart of a high-yield stock looks different on a price basis than on a total-return basis.
Order handling follows. Many exchanges adjust or cancel resting buy orders below the market on the ex-date, so a stop-order left overnight may be removed or repriced without you doing anything.
Example: a stock closes at $120.00 and pays a $0.90 dividend. The adjusted close used for the next day's percentage change is $119.10. Over a year with $3.60 of dividends the price chart understates the holder's return by about 3%.
Related: ex-dividend-date, total-return, dividend-capture, stop-order