what is the stock market and how does it work