We've had some wild winds and wild seas this weekend.
The wild seas were whipping up sea foam.
As the tide was going out there were large piles of it left strewn on the rocks and blowing around in the wind.
Looking at it you might think it is caused in the same way that egg white becomes foam, from adding air to the water through the crashing action of the waves and through the wind blowing the waves around.
So I looked up what I could find on sea foam. It seems it is a bit more complicated than just air being added. An important point is that sea water isn't pure water, there are small particles in it that come from the land which combined with seaweed and algae material combine together to create a kind of natural detergent. So the foaming is similar to when you add detergent to water to do the dishes - you get more foam, the more you stir the water up.
You can find a longer and more scientific description on the Coasting NZ blog . Which also has some photos of sea foam on the West Coast of the South Island - my photos were taken on the west coast of the North Island.
Perhaps you could do an experiment shaking sea water and tap water in different jars to see if you can create foam!