When you place a market order, the order will get executed at the best bid/offer available at the exchange.

If the quantity of the existing bids/offers isn't enough to match your order quantity, in that case, the remaining unexecuted quantity will be matched against the next best bid/offer.