Cross-bedding forms during deposition on the inclined surfaces of bedforms such as ripples and dunes, and indicates that the depositional environment contained a flowing medium (typically water or wind). Examples of these bedforms are ripples, dunes, anti-dunes, sand waves, hummocks, bars, and delta slopes. Cross-bedding is widespread in many environments. Environments in which water movement is fast enough and deep enough to develop large-scale bed forms fall into three natural groupings: rivers, tide-dominated coastal and marine settings (source)
How do cross-beds form?
When a depositional environment has sand in it and water or air moves the sand grains around, those grains can build up into piles of sediment. When the sediment piles reach a height where they are unstable - called the angle of repose - the grains will avalanche down the side of the pile and make a thin depositional layer of the grains that moved. Over time, multiple avalanching episodes will result in many thin parallel layers next to one another. These are called cross bedded laminae, because they form at an angle to the horizontal nature of the main bed. See the graphic below for an idea of how these cross-beds form over time. (source)