An order type is a set of instructions about price and execution, and the difference between them only becomes visible when the market moves faster than orders can be matched.
The two basic instructions differ on what is guaranteed
A market order instructs the broker to execute at the best available price. Execution is effectively assured, the price is not.
A limit order sets a price boundary and instructs that execution occur only at that price or better. The price is bounded, execution is not.
Every other order type builds on that trade-off, and choosing between them is a decision about which of the two risks the trader prefers to carry.
Gaps occur when the market moves while closed
Prices are continuous only while the market is open. News arriving overnight is reflected in the first prices of the next session, which can be far from the previous close.
An order resting in the book from the prior session is evaluated against those new prices rather than against the ones it was written for.
The gap is not a failure of the order system; it reflects that no trading occurred at the intervening prices because no market was open to trade at them.
A stop order becomes a market order when triggered
A stop instruction rests inactive until the market reaches the stop price, at which point it becomes a live order to trade.
Where that live order is a market order, it executes at whatever is available. If the market gapped past the stop price, execution can occur well beyond it.
A stop-limit avoids that by setting a boundary, at the cost of possibly not executing at all when the price moves through the limit without stopping.
Partial fills split an order
A limit order for a quantity larger than the volume available at that price may fill partially, leaving the remainder open.
The result is a position established at the intended price and a residual order that may fill later, never, or at a different time entirely.
Order duration instructions govern what happens to the remainder, and the available options vary by broker.
Extended hours change the conditions
Trading outside regular hours runs with fewer participants, which typically means wider spreads and less depth at any given price.
Many brokers restrict extended-hours trading to limit orders for that reason, since a market order in a thin book can execute far from the last quoted price.
The mechanics are the same as during the session; what changes is how much size sits behind each price level, which is what determines the cost of demanding immediacy.