As the returns to investing in the stock market continue to accrue, people begin pulling their money from relatively low interest savings vehicles and putting into the stock market to earn a higher return. This steady stream of money into investments such as mutual funds fuels the market even higher. Resources tend to flow where they will earn their highest return subject to the relative risk of the investment, business enterprise, employment opportunity, etc. The stock market is riskier than a certificate of deposit, but as the stock market continues to make gains, money is lured into the market due to the higher potential return.
Some people believe the increased risk they are taking is worth it.
The safest way to invest in the stock market is to invest for the long term with funds that you will not need immediate access to in the future. Getting into the stock market to try and make a quick fortune with money that you cannot afford to lose is a very dangerous financial proposition.