Understand different order types.
There are 2 types of orders. A market order is an order to buy or sell a share at the market's current best available price. A market order typically ensures an execution, but it doesn't guarantee a specified price. Market orders are optimal when the primary goal is to execute the trade immediately.
A limit order is an order to buy or sell a stock with a restriction on the maximum price to be paid (with a buy limit) or the minimum price to be received (with a sell limit). If the order is filled, it will only be at the specified limit price or better. However, there is no assurance of execution. A limit order may be appropriate when you think you can buy at a price lower than—or sell at a price higher than—the current price.