Just brewed my first batch of beer, it has been in the fermentor since Sunday and the foam from the beer has filled the air lock. What should I do?
If it's not severe, just remove it, clean it, sanitize it, and reinstall it. If it's still blowing off and coming out the top, consider using a blowoff hose. Search the forum (or google) for a gazillion pictures/descriptions.
Also, you did not ruin your beer by this happening (usually the next question). Vikeman has you covered.
Here is what's going on in your fermentor: The fact your airlock is overflowing is a sign of healthy fermentation . . . pat yourself on the back, you are doing a good job. In a short time, usually ~24 hours, the krausen will have peaked and will start to fall. You will no longer have yeast in the airlock and the production of CO2 (bubbling) will start to slow down. The graph is a rough guide only, your hydrometer will tell you when fermentation is complete.
You are probably fermenting too warm, that's why you're seeing so much activity. If a particular yeast claims an optimum temperature between 62 and 68F, you need to realize those are internal fermentation temps, usually 5-8 degrees above ambient temp, at least during the peak fermentation period. So if your room temp is 68F the beer can be fermenting as hot as 76F, and that IS bad for most beers. My personal preference is usually to chill my wort below the lower limit suggested by the yeast makers and let it warm up to optimal, then control it so it stays toward the lower end of the suggested temp range(or even just below). The blowoff hose suggest above will help with the symptoms of an overactive fermentation, but the sooner you add temp control to your bag of brewing techniques the sooner you'll be brewing great tasting beer.