Don't you wish there were a set of simple rules for how to buy stocks -- and attain guaranteed riches? Well, there are no guarantees in the stock market, but some methods are definitely better than others.

For example, if you constantly take silly risks in pursuit of quick and easy money, the odds are pretty good that you'll go broke.

On the other hand, by using some tried and true methods and the power of compounding, you'll find out how to buy stocks that will create wealth and income for you and your family.

Look for dividend growth stocks
Having an income stream from your investments is nice, but creating real wealth requires that income stream to grow over time.

Past performance is not a perfect indicator of how a stock will behave in the future, but history has shown that stocks with regularly rising dividends tend to continue that trend. You can find many such stocks on Dividend.com, which maintains lists of all publicly traded stocks that have raised their dividends for at least 10 years in a row -- or even 25 years.

To illustrate the importance of dividend increases, consider AT&T, which has raised its dividend for 29 straight years. AT&T currently pays out about 5.2% and has averaged a 4.5% dividend increase over the past decade. If this trend continues, AT&T's dividend in 30 years could be nearly 19% of today's share price. Plus, you would accumulate many more shares if you reinvested your dividends along the way.

Make it automatic
Speaking of reinvesting dividends, why not make the process automatic? All of the major online brokerages offer dividend reinvestment plans, or DRIPs, to their clients.

Basically, what this does is automatically use the dividends paid by your stocks to buy more shares of those companies, effectively compounding your income over time. So, if your AT&T holdings pay you $50 per quarter, every time the dividend is paid, your brokerage automatically buys exactly $50 worth of AT&T stock for your account.

So, other than being automatic, what's the advantage of a DRIP over simply using your dividends to buy more stock?

There are two big advantages, actually. One advantage is the ability to buy fractional shares in companies, which allows you to invest your entire dividend. $50 would only buy one share of AT&T at its current price of about $35.30, but with a DRIP, you could buy exactly 1.416 shares, taking full advantage of your compounding power.

The other benefit is that a DRIP doesn't charge you a commission when reinvesting. If you received a $50 dividend and used it to buy more stock, you'd pay a commission of about $10, depending on which brokerage you use, leaving only $40 to invest. So, in this example, using a DRIP increases your money to reinvest by 25%.

Learn from the best, and play more defense than offense
Before you buy a stock for the long run, check to see how it performs during the bad years. One of the best practitioners of this is Warren Buffett.

Buffett freely admits to his shareholders that he's unlikely to beat the market in years when the S&P jumps higher. In fact, Berkshire Hathaway has underperformed the S&P in four out of the last five years as the market has soared from the 2009 lows.

However, consider 2008, when much of the market was in free fall. The S&P 500 lost 37% of its value that year. And while Berkshire didn’t have its best year on record, it did manage to beat the market. Berkshire was down 30% in 2008 -- a 7 percentage point beat. Berkshire is made up of mostly defensive businesses that get by in any market. A full list of the stocks in Berkshire's portfolio can be found here to give you some idea of the types of businesses that will always make money.

Perhaps the most impressive thing about Warren Buffett is not his ability to pick winners, but his uncanny knack for recognizing non-losers. The S&P has had 11 negative years in the last 50, and Buffett's investments have outperformed in every single one of them.

Be patient
Even if you follow these rules perfectly, building lasting wealth takes time. You won't get rich overnight, no matter how savvy you are.

However, the right moves will create a growing and compounding income stream in your portfolio that can withstand whatever goes on in the economy. If you stick to your long-term plan, it's easy to see how to buy stocks that will make you wealthy.

Editor's note: A previous version of this article misstated Berkshire Hathaway’s stock performance in 2008. The Fool regrets the error.