How to make beer foam I want to make a beer foam, not just for an image. I want the beer fluid to pour in the glass and automatically make foam on the top of the glass and drop down due to over flow.

It should be in animated not a static render.

I have seen video that shows how to render the foam, but not as animated video. Is there a brief explanation how it works?
I would animate a simple UVWarp with a texture with transparency.

I would model the foam as a single object, not detailed at all. Look for a texture with transparent parts, apply it to the foam object. Apply a UVWarp modifier to the object (this modifier moves the texture), and animate the modifier using an armature and two bones. 

The texture should have a big transparent part, so when it is animated it looks like if its going down from nothing. Pretty sure it could do the trick for a couple of seconds.