A stock can trade on any exchange on which it is listed. And to be listed it must meet all of the exchange's listing requirements and pay for any associated fees.
If it chooses to do so, a company can list its shares on more than one exchange, which is referred to as dual listing - although few companies do. However, there are some companies that are listed on both the NYSE and Nasdaq. Charles Schwab, Hewlett-Packard and Walgreens, for instance, all have dual listings on both exchanges.
One reason for listing on several exchanges is that it increases a stock's liquidity, allowing investors to choose from several different markets in which to buy or sell shares of the company. Along with the increased liquidity and choice, the bid-ask spread on the stock tends to decrease, which makes it easier for investors to buy and sell the security in the market at any time.
Multinational corporations also tend to list on more than one exchange. They will list their shares on both their domestic exchange and the major ones in other countries. For example, the multinational British Petroleum trades on the London Stock Exchange as well as the NYSE.
The increasing use and popularity of depositary receipts has helped raise the number of companies trading on exchanges in different countries. These investment products, which represent a company's stock deposited at a domestic bank, can be issued by that bank on a foreign exchange with or without the endorsement of the company being traded. Depositary receipts allow investors around the world to purchase and sell large international companies' stock.
(For further reading, see Getting to Know Stock Exchanges and What Are Depositary Receipts?.)