Is it better to invest in the stock market or to keep money in a savings account?
There are key differences between investing in the stock market versus keeping money in a savings account. Savings accounts can be FDIC insured up to $250k (although there are services that can increase this limit such as Wealthfront) and thus are extremely safe places to store money, but these accounts generally have very low interest rates and thus the money will not grow quickly (or at all, compared to inflation). Generally it is recommended to keep an emergency fund available in savings accounts as they may need to be quickly accessible. 

The stock market works differently - you are purchasing shares of a company, and ideally that company grows over time, thus increasing the value of the underlying stocks. People generally invest in the stock market in order to grow their money over time, although it is recommended to measure the success or failure of investments over a long time period (greater than 10 years). The broader US stock market has historically grown nearly 10%/year on average, although many years significantly deviate from that growth rate.