The sand piled up on any given beach isn't a static, solid block. It's utterly filled with spaces and gaps. When the tide goes out, the water that had been in those gaps is replaced by air from the atmosphere. When the tide comes back in, that air has to go somewhere. As the tide rises and the water table at the beach rises, the air gets compressed and forced upward. Usually it escapes easily, leaving thousands of tell-tale "nail holes" dotting the sand just behind the high-tide line:
Beaches -- and the science of beaches -- are amazing things.
For a great read on things you can look for at your beach, check out "Exploring the Sand" from CoastalCare.org and Dr. Orrin Pilkey.