A market maker is a firm who quotes both a buy and a sell price in a financial instrument or commodity, hoping to make a profit on the turn or the bid/offer spread.
In foreign exchange trading, where most deals are conducted Over-the-Counter and are, therefore, completely virtual, the market maker sells to and buys from its clients. Hence, the client's loss is the market-maker firm's profit and vice versa. Most foreign exchange trading firms are market makers and so are many banks, although not in all currency markets.
Most stock exchanges operate on a matched bargain or order driven basis. In such a system there are no designated or official market makers, but market makers nevertheless exist. When a buyer's bid meets a seller's offer or vice versa, the stock exchange's matching system will decide that a deal has been executed.
In the United States, the New York Stock Exchange (NYSE) and American Stock Exchange (AMEX), among others, have a single exchange member, known as the "specialist," who acts as the official market maker for a given security. In return for a) providing a required amount of liquidity to the security's market, b) taking the other side of trades when there are short-term buy-and-sell-side imbalances in customer orders, and c) attempting to prevent excess volatility, the specialist is granted various informational and trade execution advantages.
Other U.S. exchanges, most prominently the NASDAQ Stock Exchange, employ several competing official market makers in a security. These market makers are required to maintain two-sided markets during exchange hours and are obligated to buy and sell at their displayed bids and offers. They typically do not receive the trading advantages a specialist does, but they do get some, such as the ability to naked short a stock, i.e., selling it without borrowing it. In most situations, only official market makers are permitted to engage in naked shorting.
On the London Stock Exchange (LSE) there are official market makers for many securities (but not for shares in the largest and most heavily traded companies, which instead use an automated system called TradElect). Some of the LSE's member firms take on the obligation of always making a two way price in each of the stocks in which they make markets. It is their prices which are displayed on the Stock Exchange Automated Quotation system, and it is with them that ordinary stockbrokers generally have to deal when buying or selling stock on behalf of their clients.
Proponents of the official market making system claim market makers add to the liquidity and depth of the market by taking a short or long position for a time, thus assuming some risk, in return for hopefully making a small profit. On the LSE one can always buy and sell stock: each stock always has at least two market makers and they are obliged to deal.
This contrasts with some of the smaller order driven markets. On the Johannesburg Securities Exchange, for example, it can be very difficult to determine at what price one would be able to buy or sell even a small block of any of the many illiquid stocks because there are often no buyers or sellers on the order board. However, there is no doubting the liquidity of the big order driven markets in the U.S.
Unofficial market makers are free to operate on order driven markets or, indeed, on the LSE. They do not have the obligation to always be making a two way price but they do not have the advantage that everyone must deal with them either