Market Microstructure

At the mechanical level, prices are set through the interaction of bids and offers. A bid is the highest price a buyer is currently willing to pay; an ask (or offer) is the lowest price a seller will accept. The difference is the bid-ask spread, which represents the cost of transacting immediately. Highly liquid stocks — those with many buyers and sellers — have tight spreads. Illiquid stocks have wide spreads, making them costly to trade.
Market makers — firms that stand ready to buy or sell continuously — provide liquidity by quoting both a bid and an ask at all times. They profit from the spread while taking on the risk of holding inventory. Electronic markets and algorithmic traders have compressed spreads dramatically over the past two decades.