The stock market lets institutional and individual investors trade shares of public companies. Learn how it works, why prices move, and how investors buy and sell shares.