Image source: Getty Images.

The stock market is perhaps the best way to build wealth, but it can also be an easy place to lose money if you do things the wrong way. Specifically, letting emotions get the best of you or trying to get rich quick by day trading almost always result in big losses. Here's what you want to avoid, and some advice on how to actually get rich in the stock market.

Buy high and sell low

This may sound like a silly thing to say. After all, it's common knowledge that the central point of investing is to buy low and sell high.

In reality, however, that is done less often than you may think. Investors are human beings, and human beings are emotional creatures and tend to follow the herd. When the market is crashing and it seems there is no bottom in sight, too many people panic and sell at the worst possible time.

On the other hand, when stocks are going higher and higher and people see their friends making money, they throw all of their money into the market at the worst possible times. I've been guilty of this, too -- it's what led me to buy First Solar for more than $200 per share in 2008.

According to a report (link opens a PDF) by BlackRock, the average investor earned an annualized return of just 2.11% during the 20-year period from 1996 through 2015. During the same period, the S&P 500 averaged returns of 8.19%, and even bonds managed 5.34%. The emotions of greed and fear are a big reason. It's no wonder Warren Buffett feels the best possible investment for most people is to simply dollar-cost average into a S&P 500 index fund.

Day trade

I've said this before, but it's worth revisiting because it's such a common misconception that day-trading is the best way to make money in stocks, especially among new investors. Aside from the fact that most new investors don't understand nearly enough about how the markets work to effectively day trade, the mathematics of it simply aren't in your favor.

Let's say that you make a total of 20 round-trip (buying and selling) trades per trading day. With roughly 250 trading days in a year, that's 5,000 buying transactions and 5,000 selling transactions. At a $10 commission, this translates to $100,000 per year in commissions alone. To put this in perspective, your trades could actually generate $80,000 in gross profit for the year, and you'll still end up losing $20,000 – you'll need a six-figure trading profit just to break even.

How bad does day trading usually turn out, exactly? It's tough to quantify it with dollar figures, but the facts show that it's pretty difficult to make any money. One research report found that just 13% of day traders earn a net profit in any given year, and only 1% are consistently profitable.

Do yourself a favor and stick to buy-and-hold investing -- leave day-trading to professionals. Maintaining a portfolio of high-quality stocks is the most certain path to stock market wealth. You're not going to get rich tomorrow, but you won't go broke, either.

How to make tons of money in the stock market

In a nutshell, the most surefire way to make a ton of money in the market is to do the exact opposite of the things discussed here. Specifically:

1. Buy low and sell high. Buy consistently profitable and stable stocks now, and hold them for years into the future, and then sell at a much higher price. Don't try to time the market -- it's always a good time to buy for the long term.

2. Invest with a long-term mentality. Warren Buffett once said, "If you wouldn't own a stock for 10 years, don't even think about owning it for 10 minutes." Remind yourself of this principle every time you consider buying a stock.