The bid-ask spread is the difference between the highest buy order (bid) and the lowest sell order (ask) for a given market. It’s essentially the gap between the highest price where a seller is willing to sell and the lowest price where a buyer is willing to buy.
The bid-ask spread is a way to measure a market’s liquidity. The smaller the bid-ask spread is, the more liquid the market is. The bid-ask spread can also be considered as a measure of supply and demand for a given asset. In this sense, the supply is represented by the ask side while the demand by the bid side.
When you’re placing a market buy order, it will fill at the lowest available ask price. Conversely, when you place a market sell order, it will fill at the highest available bid.