If you fell into quicksand in real life, you wouldn't sink in like people do in the movies.
Here's a GIF showing a man jumping around on some quicksand in Morecambe Bay.
Quicksand is a mixture of sand and water that looks solid, but acts like a liquid when you disturb it.
You're less dense than quicksand, so you can't sink unless you're holding heavy items or you struggle and make the quicksand liquify more.
It's the same principle that explains why you float in water (thanks, Archimedes). "You float much better in quicksand because it is acting as a fluid that is twice as heavy as water, which is why one only sinks to about half of one's body length," says Zimmie. "The heavier the fluid, the better things float."
To get out, just lie on your back and use your arms to pull yourself to safety, says Zimmie.
It should be easy enough to drag yourself the few feet. If you're in the middle of a larger patch of quicksand, you're in more trouble, but then how did you get into the middle of it in the first place?
If that doesn't work, you might need search and rescue to come and get you.
So if you get stuck, call for help and then sit tight, safe in the knowledge that you'll never fully sink.
Just hope that a high tide isn't due, because then you're screwed.