A market order buys or sells at average market price. A limit order buys or sells at a price better than market price at the time. Its “limit price” is set by the trader upon order entry.
Both types of orders are subject to slippage (price fluctuation at the last minute).
For more in-depth reading, see Investopedia’s article: Market Order & Limit Order.