The difference between the Bid and Ask prices on a stock or other security are known as the Spread.
Designated market makers are traders whose job it is to make a market for securities, by offering to buy or sell shares, and thus creating liquidity, often at the same time. Their money is made on the spread. In highly liquid markets, the spread will shrink. So if everyone is buying and selling the same stock one day, there may be virtually no spread between the Bid and the Ask price, and this is seen as efficient.
However, markets are not always so liquid, which is why there are Market Makers. These companies earn their money on the spread between the Bid and Ask, while providing the convenience of shares on offer to buy or sell. There are Designated Market Makers (DMMs) on most exchanges, which represent a cornerstone of market functionality and liquidity, and are usually appointed to the role by the exchange.
They are appointed to make markets for specific zones of the market and must do most of their trading within that zone or niche. In many cases, there may be de facto market makers who are basically brokers and banking institutions who are making shares available to their clients and the market and making money on the spread. Market makers exist on all sorts of exchanges, including the Forex market.