We at The Motley Fool to look at investing like a marathon, not a sprint. Unfortunately for many investors, the headlines on most major financial news sources have to do with short-term moves in the market, telling you what the market and the latest "it" stocks did today.

Source: 401kcalculator.org via flickr

So, how do you filter out that information and decide what stocks to buy for the long run? How do we separate the companies that are doing well over the past few days from the companies that will still be thriving 10 years from now, 20 years from now, or more?

Look for companies with a "wide moat"
Warren Buffett is well-known for investing in companies with a wide economic moat. In other words, he looks for companies with a very distinct competitive advantage that would be hard for competitors to penetrate.

These are generally companies that are dominant in their industries, and will likely maintain this position for the foreseeable future. For example, companies that own a lot of patents, like Pfizer, or companies with extremely strong brand names, like McDonalds or Coca Cola, are "wide moat" companies.

Now, only having a wide moat isn't necessarily a guarantee that a company will withstand the test of time. Companies can eventually begin to lose their advantage over time to rivals. So, in order to find stocks that will provide great returns for decades to come, we need to dig a little deeper.

In stocks, history does tend to repeat itself
What I mean by this is that companies that have a good track record of creating shareholder value in the form of dividends and share buybacks tend to continue to do so. And, great dividend stocks tend to significantly outperform non-payers over the long run.

Many experts call these type of stocks "Dividend Aristocrats," which refers to any stock that has increased its dividend annually for a minimum of 25 consecutive years. And, if you look at this list of stocks that fit the description, there are quite a few.

And, most of these stocks have very good share buyback programs. For example, Coca Cola has increased its dividend for 51 years in a row. And, the company has repurchased more than 6% of its outstanding shares since 2010.

When you have a company that increases its dividend and buys back shares, it creates a one-two punch of value that produces excellent returns over long time periods.

The "100-year rule"
Finally, companies you invest in for the long run should pass the "100-year rule." Before buying a stock, ask yourself: How likely is the company to be around in 100 years?

Just as a few examples, people will always need to buy food, maintain their homes, and keep their money in a safe place. Companies with a "wide moat" in these industries (Wal-Mart, Home Depot, and Wells Fargo, for instance) should be able to withstand the test of time.

However, some of the best-run, sector-leading companies in the world don't necessarily pass this test. Take a look at Apple as an example. Sure, it is the leader in mobile phones and tablet computing, but are those two things people will still need in 100 years? Maybe, but maybe not.

Final thoughts
Now, I'm not saying that all of the stocks you invest in need to meet all three of these characteristics. In fact, I think Apple is a great investment at its current share price.

However, the title of this article is "stocks that will make your kids rich." Would you feel comfortable buying 100 shares of Apple and putting them in a time capsule for your kids to open in 50 years? Maybe, but I would definitely feel a lot more "at ease" if the time capsule was filled with investments like Wal-Mart, Johnson & Johnson, and Procter & Gamble.

As a final thought on the wide moat companies who always increase their dividend and will be around for years to come, consider that a $40 investment in Coca Cola in 1919 (95 years ago) would be worth nearly $11 million today after years of growth, buybacks, and compounded dividends.

So, if you really want to make your children and grandchildren rich, this is the most foolproof way to do it.