A market order allows you to buy or sell a stock at the best available price. If you’re placing a buy market order, you want to buy a specified quantity of stock from the exchange at any price available. Similarly, if you’re placing a sell market order, you want to sell your stock at any price buyers are willing to give.
The advantage of market orders is that your trade will execute as soon as it reaches the exchange if there are willing counterparties i.e. buyers for your sell market order or sellers for your buy market orders. However, the instant order execution comes at the cost of slippage (which means you could be paying slightly more money to buy or getting slightly less money to sell your stocks).