Foamy beer can be caused by several factors including temperature, pressure, and the condition of the lines and tap. If your beer is too warm, the CO2 comes out of solution faster, causing foam. If the pressure is too high, it can also cause foamy beer.