Foam is a goal element on some levels.

To remove it, make matches or activate power-ups next to the cells it occupies. Foam that has light blue color, takes one match or power-up activation to remove. Darker blue Foam will require a bit more work: make two matches, or activate power-ups twice to destroy it.