Don't pump the gas and don't leave the car running to warm it up. Both are unnecessary and potentially bad for your car's engine. Ease the car out without spinning the wheels - that will only dig you in deeper. If more traction is needed, use sand, salt or traction mats. If you're still stuck, try rocking the car, but don't let anyone stand directly in line with the wheels as they could be hurt by thrown objects.
Traction is greatest just before the wheels spin.
Gentle pressure on the accelerator is the best method for retaining traction and avoiding skids. If your wheels start to spin, let up on the accelerator until traction returns. On up hills, retain enough momentum to reach the top. On down hills, go as slow as possible, using gentle, slow brake application. Normal dry pavement following distance of two to three seconds should be increased to eight to ten seconds when driving on snow and ice.