English: A polychaete (bristle worm). Polychaete means "many bristles"; what might appear to be numerous legs are really fleshy protrusions (called parapodia) bearing clusters of bristles (chaetae); these creatures are therefore also commonly referred to as "bristle worms". Although the bristles are not legs, the worm does use them to get around.
[Some of the most commonly encountered polychaetes are the various kinds known as rag worms, and the specimen shown here is one of these; however, more information than can be discerned from this photograph would be needed to properly identify it to species.]
This one is shown moving around in the shallow waters of Hunter's Burn, at the point where it flows out onto the beach: 1087778. I happened to notice the worm while crossing the burn, and was able to take a few quick snaps of it before I moved on (in any case, it soon began to burrow into the sand).
In this image, the head end is located to the upper right (although too small to be visible in this image, the head has a couple of fleshy palps on it). The prominent red line that runs down the length of the body is a dorsal blood vessel.
Slightly different forms of this species, and of other polychaetes, are sometimes encountered: called epitokes, they inhabit the surface waters of the sea; the main difference in their appearance is that the rear segments of the epitoke are modified for swimming.
[For more information on these species, see, for example, "Hamlyn Guide: Seashores and Shallow Seas of Britain and Europe" by Andrew Campbell (illustrated by James Nicholls).]
Another polychaete, whose wormcasts are a very familiar sight on beaches, is the lugworm:
1055112.