For a glass to be beer clean, it first has to be regular clean — that means washing it in hot, soapy water, as you would any other dish. But to be clean enough for beer, you need to go a step further and make sure there is no soapy residue left behind in the glass. That means rinsing the glass thoroughly after washing, and then drying it with a clean towel.
As a final step, a bar might rinse the glass one last time right before the beer is poured. This ensures the glass is perfectly clean, allowing the carbonation to frictionlessly flow up the sides of the glass.