Are you referring to the liquid in the airlock foaming up, or foam from the fermentor making its way to the airlock?
In the first case, that's normal if you use a foaming sanitizer in your airlock. In the latter case, you'll want to remove the airlock, clean it and replace it, or (even better), install a piece of blow-off tubing. This is nothing but a sanitized piece of tubing inserted into the lid grommet that leads into a small vessel containing sanitizer. A blow-off setup allows that foam to leave the fermentor without making a mess or risking infection.