If you scoop up some water from the ocean in a clear glass and look at it closely, you'll see that it's chock full of tiny particles. Sea water contains dissolved salts, proteins, fats, dead algae, and a bunch of other bits and pieces of organic matter. If you shake this glass of ocean water vigorously, small bubbles will form on the surface of the liquid.
Sea foam forms in this way -- but on a much grander scale -- when the ocean is agitated by wind and waves. Each coastal region has differing conditions governing the formation of sea foams.
Original article: What is sea foam?