The stock market is a wonderful way to make money because you don't have to sell. Therefore, there's only 2 ways to mess up.
1. Buy the wrong company.
2. Buy at the wrong time.
You can negate rule 2 by using a valuation system that is consistent over time. When a stock is expensive you don't buy or you should sell. When it is cheap, you buy and hold!
Rule 1 is harder to gauge. But here is an example. Imagine the year is 1900 and you see a horse carriage company that is real cheap. Should you buy it? Hell no! Ford Motor company will put them out of business in a decade. This is what you call a "value trap". Will Coca-Cola, Johnson and Johnson, and 3M be around in 50 years? I think so. Here's a tougher one. How about Oracle?
PS: the stock market as a whole is expensive now.