It's been a staple of adventure movies and fiction for generations.
Our hero is traipsing through a swamp, fighting off all manner of alligators, giant snakes, and what-not, when-suddenly!-he discovers he's stepped into a pit of quicksand. Can he get free, or will he be drawn to certain death, leaving only his hat, bobbing on the surface? If this were real life, not the movies, and if he doesn't panic, our hero should have no trouble freeing himself from this peril.
Aside from Hollywood studios, quicksand is usually found near the mouths of large rivers or along beaches and streams where pools of water can become partly filled by sand. It's often formed by a flow of groundwater that passes upward through sand.
Quicksand is a mixture of two things: sand and water. The reason you don't sink into ordinary sand is because the sand grains rest against each other in an interlocking pattern. This mutual contact helps them distribute your weight and hold you up.
However, if there's enough water between the grains of sand to keep them out of contact, the sand can no longer bear your weight. The sand and water mixture functions like a liquid and you start to sink.
Unlike in the movies, quicksand will not suck you under. The mixture of sand and water is denser than water alone, so it's actually more buoyant. You float better in quicksand than in water. The only reason some people have drowned in quicksand is because they've panicked.
Don't ever play in quicksand, but in the unlikely event you're accidentally caught, stay calm, float on your back, and call for help. If no one's around, gently squirm on your back to firmer ground.