This depends on the order type.
During trading hours, market orders are executed immediately, whereas limit/stop-loss orders are executed once the specified price criteria are met.
If the market is not open, your orders will be queued and submitted when the market opens again.
Here is a quick summary of the supported time slots for different order types for US market: