Unlike dragons and multi-story gorillas, quicksand is a very real thing.
Quicksand is a colloid hydrogel. Basically that means you have a lot of granular material like sand, silt, clay, or even grain, that is saturated with water. When the water in this mixture cannot escape it creates this solid looking gel or mud.
But appearances can be deceiving as any small stress will cause the quicksand to lose viscosity and the water to separate from the sand. So someone stepping on what looks like solid quicksand will start to sink as the sand and water quickly separate - the person's foot displaces the water and the sand thickens creating a vacuum and pulls the foot down. To move in quicksand, you must apply enough pressure on the sand to "reintroduce" water back into the sand to liquefy it. And this is what makes quicksand so deadly.
It's not that people actually drown in quicksand... the human body is actually much more buoyant than quicksand. At most you will be swallowed up to your armpits. But the force required to reintroduce water into quicksand is humongous. To remove a foot from quicksand at a speed of 0.01 m/s would require the same amount of force as "that needed to lift a medium-sized car." - So even if the quicksand doesn't straight up kill you, you are now trapped and exposed to the elements where you will eventually succumb to dehydration and exposure.
How Do You Escape Quicksand?
Well the first thing to remember with quicksand is that quicksand will not swallow you whole - so relax. Frantically fighting the quicksand will only make it worse.
Remove all the excessive weight you have. Ditch your backpack as the weight is pushing you down further. You may have to ditch your shoes as well as boots can be a suction cup when in mud.
Next try to either lean back or lean forward to cover as much surface area with your body weight. Just like a swimming pool - you'll sink if you try to stand but you'll float if you lay on your back. While on your stomach or back, muscle your legs out of the quicksand. Once free, crawl your way to safety.
Quick Sand in Fiction
Quicksand has been around since antiquity, One of the earliest known depictions comes from The Bayeux Tapestry - a 230-foot-long linen depicting the events that lead up to the Norman Conquest of England.
In one of the scenes depicted Harold, later King of England, rescues a pair of soldiers with their horses who have become trapped in the mud near Mont St. Michel whose surrounding beaches are notorious for quicksand.
The sinking feeling of quicksand lingered in European literature. Shakespeare even referenced it King Henry the Sixth describing George, the Duke of Clarence as "a quicksand of deceit."
Dressed in a revealing (by 1909 standards) bathing costume, the heroine tries to scurry to safety when the tide comes in. Alas, she gets her feet stuck in a pond of quicksand -- and as if this wasn't peril enough, the waters are rising all around her. The girl is rescued by a party of hooded monks, who offer her shelter in their monastery. The film ends as the girl, falling asleep in front of a religious mural, dreams that she meets the Madonna and the Christ Child. According to studio publicity, one of the actors in this film narrowly escaped death for real during the quicksand rescue scene.
But the fascination with quicksand didn't get really deep until the 1960s - the stuff was nearly everywhere.
In total, nearly 3 percent of the films in that era—one in 35—showed someone sinking in mud or sand or oozing clay. From low rent B-movies all the way up to the Oscar winning epic Lawrence of Arabia:
But going into the 70s and 80s the quicksand trope began to dry up, being used as more of an ironic device in Blazing Saddles and shows like Perfect Strangers and Small Wonder
By the end of the century the threat of quicksand had lost it's terror even being used as a light-hearted plot device to deliver Indiana Jones some news.
If only Indiana Jones had laid flat on his back...
Well just as with any movie trope, Quicksand just lost it's momentum. After all, you don't see a lot of dastardly villains tying damsels to railroad tracks any more. Quicksand, like the Western, may have also been a victim of the urbanization of America - as kids spend less time outdoors, there's less familiarity with natural dangers like quicksand.
Despite the decreasing use in film and television, there are still an active fan base collecting every quicksand scene they can get their hands on:
Some take it even further - fetishizing quicksand as a bondage metaphor or even the quicksand itself as an erotic substance.