How Does The Stock Market Work?

How does the stock market work? In a nutshell, the stock market is a...