the swash carries material up the shore and deposits it, the waves are unable to carry all the material back because the back wash is weaker than the swash, the heaviest material is dropped first, at the top of the beach and the finer material is carried back down, closer to the shoreline, over time, this material builds up