Wrack is primarily made up of kelp that has come loose from where it grows offshore and has washed up along the beach. The California Coastal Commission has defined "wrack" or "beach wrack" as "organic material such as kelp and sea grass that
is cast up onto the beach by surf, tides, and wind."
A more inclusive definition is "items washed onto the beach from the open sea" which includes plastic, glass and metal marine debris. Wrack accumulations on beaches where wrack appears are referred to as the "wrack line" which usually marks the high tide line. The organic portions of wrack provide food and habitat to many species that inhabit the shoreline, including insects and birds. Wrack also provides an incubator to grasses and other plants which grow along the shoreline and help to anchor dunes.
Here's a link to a brief article on the ecological value of wrack.
Also see the Oregon Sea Grant publication Flotsam, Jetsam and Wrack and this graphic from California State Parks on the ecological value of wrack.