Longshore drift refers to the movement (or transportation) of sediment along a coastline, by the waves. The prevailing wind determines the angle at which the swash (the waves which move up onto the beach) comes in. The backwash (the waves coming down off of the beach) will come down in a straight line. This creates a zig-zagging effect as the swash comes in at an angle and the backwash comes down at a 90 degree angle to the beach. Material is moved via this process as it is pushed up onto the beach by the swash and pulled down off of the beach by the backwash. The zig-zagging motion therefore moves sediment along the coast, continually pushing it onto and off of the beach. Eventually, if the coastline ends or changes direction, the sediment will have nowhere else to go so might be deposited and build up to form a spit. A salt marsh may also form behind this.