To be avoided
Have you ever stepped into quicksand and then sunk right in till you were waist deep? No? You will be surprised to learn that, despite a life of rugged adventure and fearless exploration of the planet's remotest regions - and don't ask, 'Remote from what?', because it should be obvious that I mean remote from the cricket ground at Old Trafford... you will, as I was saying, be surprised to learn that neither have I. Had this ever happened to me, though, I would not have allowed myself to be dragged from the quicksand by a horse or a truck. It's a dangerous myth that this will work, a myth debunked here. What you should do:
One option to get out is for the person to wiggle his feet gently, gradually allowing water in around the edges. He could then pull himself up by fractions of an inch at a time.And if the person's feet aren't his-ish kind of feet but hers-ish ones, I trust the same would apply.
As well as not getting stuck in quicksand, other things not to do: don't get stuck in outer space, because no one will be able to hear you shout for help; and don't jump through plate glass, if you value your body parts.