The phrase "chocolate beer" can be confusing because it can mean a few different things. Just because a beer is described as or even named chocolate by the brewery, it does not necessarily mean that it is a beer with chocolate in it.
Real Chocolate Beers
The obvious conclusion is that, like the phrase chocolate milk, chocolate beer refers to beer made with chocolate. This is often the case and there are many fine beers brewed with chocolate.
Cocoa powder is typically used when brewing beer. Most other forms of chocolate contain some measure of cocoa butter. This fat can cause issues with the final beer, so the dry, fat-free powder is the best option for brewing.
Young's Double Chocolate Stout and Rogue Chocolate Stout are two examples of chocolate beer.
Beers With Chocolate-Like Flavors
There are also 'chocolaty' stouts and porters out there that do not have a trace of real chocolate in them. These chocolate-like flavors are produced when the right blend of dark roasted barley is used that results in a distinct chocolaty flavor and aroma in the final beer.
This refers to those subtle undertones that professional tasters find in beer, wine, and distilled spirits. Just because we get hints of a certain flavor in the finished product, it does not mean that an ingredient was actually used in making it. When one becomes accustomed to really examining all of the flavors in any beverage, there are countless subtleties that can be noticed.
For instance, there are notes of lemon evident in 312 Urban Wheat Ale. However, as noted in that review, there is no evidence that lemon (or any citrus) is used in that recipe.
Many of the typical stouts like Guinness will have notes of chocolate.
Beers That Use Chocolate Malt
Finally, "chocolate" can come into beer in the form of a special barley malt called chocolate malt. The name is more of a reference to the color of the malt because it has the appearance of dark chocolate. It lends a roasted or nutty flavor to the beer as well as a deep red color.
Chocolate malt alone will not create a beer with a chocolate-like flavor. That said, many of the beers that use a chocolate malt will have a flavor that is best compared to chocolate.
Chocolate malt is also often used in porters and stouts and Samuel Smith Nut Brown Ale is just one example.