Most financial experts agree that the best time to start investing in stocks is when you're young and have time to wait out the downturns and take full advantage of compounding. But it's not easy to know where to start.
That might explain why just 26 percent of Americans under age 30 are now investing in the stock market, according to a recent survey by Bankrate.com. Compare that with 58 percent of people between ages 50 and 64 who invest.
Sure, the fact that boomers are older may explain some of the difference. But age isn't the only factor. In a recent study, millennials said that a lack of financial knowledge makes them less confident about investing. And a lack of information was the number two reason respondents of every age in the Bankrate survey gave for avoiding the market (the other was a lack of money).
Here's what you should know before you invest so you can make the most of your money.
Before you even open an investment account, make sure you've paid off your credit card debt and that you have emergency money set aside in a savings account in case you get hit with unexpected expenses or a job loss (aim for enough to cover about three to six months' worth of expenses).
You also want to make sure you're taking full advantage of the benefits of tax-advantaged retirement accounts. Advisors recommend maxing out your employer-sponsored plan or individual retirement account before opening a regular investment account. "The first place to consider putting money is an employer plan because those often have matching funds and you want to get all of those you can," said certified financial planner Dan Moisand of Moisand Fitzgerald Tamayo in Melbourne, Florida.
For 2015, you can contribute up to $18,000 in your 401(k). If you're not able to meet the maximum, aim to contribute at least enough to take full advantage of any employer match. That's free money!
Read MoreHow to get lucky with your savings
Don't have access to a 401(k)? There are other options. You can contribute up to $5,500 this year into a Roth IRA or a regular IRA.
A Roth IRA lets you grow your money tax-free, but you do pay taxes on contributions. With a regular IRA you'll be taxed when you start taking money out, but you won't pay taxes in the meantime on annual gains.
If you're fortunate enough to have exercised those options and still have some cash left over, you can open a regular investment account. But there are a few things to keep in mind.
Read MoreJob hunting tips for millennials