Warren Buffett of Berkshire Hathaway (NYSE:BRK.A)(NYSE:BRK.B) doesn't simply buy great stocks; it buys great businesses. And there is only one way a business can be "truly great."

Like castles, it must it must have a wide moat that protects it from attacks.

The wide moat
The 2007 letter to Berkshire Hathaway shareholders had a section titled "Businesses -- The Great, the Good, and the Gruesome," where Buffett explored how businesses can gain a competitive edge.

While the "moat" analogy wasn't exactly new -- he also used it in the 1986 letter to describe Geico -- it's a powerful one to consider, and there are many things we can learn from it.

What isn't a moat
Buffett went on to say:

Our criterion of "enduring" causes us to rule out companies in industries prone to rapid and continuous change. Though capitalism's "creative destruction" is highly beneficial for society, it precludes investment certainty. A moat that must be continuously rebuilt will eventually be no moat at all.

This is a powerful reminder of the difference between societal benefits and investing benefits. After all, there have been a host of industries that have undergone rapid change since Buffett took the helm at Berkshire Hathaway in 1965.

Yet thinking of a more recent example, consider smartphones. In 2009, there were more than 34 million BlackBerry (NYSE:BB) phones sold, representing 20% of the market. But in 2013, it sold nearly half that number, as its market share plummeted to less than 2%.

How does that compare with competitor Google (NASDAQ:GOOG)?

Words simply don't do it justice:

Source: Gartner.

Over the past five years, Google has seen an explosion in the number of phones sold that run its Android operating system, as it claimed just 4% of the market in 2009 to nearly 80% in 2013. And while it isn't a direct comparison, consider that when the iPhone was announced in 2007, Jim Balsillie, the CEO of what was then called Research In Motion, said:

It's kind of one more entrant into an already very busy space with lots of choice for consumers. ... But in terms of a sort of a sea change for BlackBerry, I would think that's overstating it. 

There is perhaps no clearer example of an industry "prone to rapid and continuous change" than that of smartphones, and the dangers of an illusory moat and how quickly such a supposed castle can be overtaken. Considering BlackBerry has watched its stock plummet by more than 90% while Google has watched its rise by 150%, it's understandable why Buffett recommends we avoid those industries at all costs.

What is a moat?
So what exactly does Buffett suggest is a moat? In his own words:

Therefore a formidable barrier such as a company's being the low-cost producer (Geico, Costco) or possessing a powerful worldwide brand (Coca-Cola, Gillette, American Express) is essential for sustained success. Business history is filled with "Roman candles," companies whose moats proved illusory and were soon crossed.

Low costs and a powerful brand? That's all we need to find?

No. But they're certainly on the list.

Buffett suggests that each of those is an example of "a formidable barrier," but he also says there are others. For example, he said one of the reasons he enjoys See's Candies, which Berkshire acquired in 1972, is that it doesn't require continual investments, and that its profits -- standing at $1.7 billion through 2011 -- have instead been used to "buy other attractive businesses."

He went on to say:

A company that needs large increases in capital to engender its growth may well prove to be a satisfactory investment. There is ... nothing shabby about earning $82 million pre-tax on $400 million of net tangible assets. But that equation for the owner is vastly different from the See's situation. It's far better to have an ever-increasing stream of earnings with virtually no major capital requirements. Ask Microsoft or Google.

He's also spoken to businesses that treat customers well, the importance of great managers, and countless other things through the years that will lead to success.

All of this is summed up in one of Buffett's most famous quotes in 2012:

More than 50 years ago, Charlie [Munger] told me that it was far better to buy a wonderful business at a fair price than to buy a fair business at a wonderful price.

When we make investments, we must examine not just the price, but the business, too. And Buffett suggests that when we find those with lasting moats that will protect them from competitors selling at "sensible prices," this is what we must see:

It's better to have a part interest in the Hope Diamond than to own all of a rhinestone.