The majority of the flavor of beer begins with the ingredients used, the brewing process and how the beer is left to develop.
But beer today comes in a variety of flavours ranging from Coffee, Rose to the harry potter's famous butterbeer.
This flavouring process is not as complicated as it seems and you can even do this to any kind of beer to add a hint of complexity after the brewing process.
Make sure you get your base ingredients from quality suppliers, for example coffee beans from a quality coffee bean supplier.
Make sure to grind those coffee beans up to increase the surface area for permeating the liquids.
The quality of those ingredients you use will greatly impact the after taste of the beer as the ingredient will be allowed to steep in the beer for days, transferring their flavour profile and transforming your beer in the process.
Also, the variety of coffee you use can help you create different types of coffee beers within that category so make sure it's a coffee that you will consume.