The phrase "chocolate beer" can be confusing because it can mean a few different things.
The obvious conclusion is that, like the phrase chocolate milk, it refers to beer made with chocolate. This is often the case; there are many fine beers brewed with chocolate. Usually cocoa powder is used when brewing beer. Most other forms of chocolate contain some measure of cocoa butter, a fat that can cause issues with the final beer, so the dry, fat-free powder is the best option for brewing.
There are also chocolaty stouts and porters out there that don't have a trace of real chocolate in them. The right blend of dark roasted barley can produce a distinctly chocolaty flavor and aroma.
Finally, "chocolate" can come into beer in the form of barley malt called chocolate malt. The name is more of a reference to the dark chocolate color of the malt. 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.

