If the car moves even slightly, avoid applying too much power which can spin the tires in place. Spinning wheels offer less traction. Patiently move the car out of the area and back onto more solid ground.

If the wheels spin and the car is not moving, try "rocking" the car. Slowly give the car power to the point that the tires begin to spin then immediately release power. You will notice that the car slightly rocked forward then back. Do this repeatedly as you try to gain momentum in each rocking cycle. Just like a child pushing a swing, you synchronize the push (or gas) so that the rocking motion is increased. With a bit of timing and luck, you could rock just enough to regain traction. (In cars with automatic transmission, rocking requires shifting back and forth between forward and reverse. In a manual, simply engage and disengage the clutch while stepping on the gas)

If your car is stuck with one wheel spinning while the other is not, try this trick: Engage the parking brakes two or three clicks. Step on the gas slowly to get the car moving. As soon as the car starts to move, release the parking brake completely. Because spinning wheels don't have traction, what you are doing by engaging the parking brake is allowing a clutch in the differentials to energize allowing the car to adjust for increased traction.