Steering failure is probably as common as alien abduction. Having said this it's useful to know about it (steering failure, that is!).
The most likely cause of steering failure is a loss of power steering. This can happen if a hydraulic pipe breaks or is cut by debris from the road. Even in this eventuality it's unlikely that the power loss would be sudden. It's probable that the steering would gradually become heavier, thus giving a warning.
If you lose your power steering be prepared to hang on to the wheel with all of your strength to turn it. Stop as soon as possible. If the power steering has failed because the engine has cut out you may need extra pressure on the brakes to stop the car.
Don't try to drive the car to a garage if you feel the steering start to get heavier, get the garage to come to you - stop as soon as you can, pull on to the hard shoulder on a motorway or to the side of the road on other roads. make sure that you take all the normal safety precautions, hazard lights, watch out for traffic, etc., especially if you are on a fast road or stopped in a difficult position.
The second type of steering failure is a breakage of the mechanical linkage. Although I have never heard of this happening, it is almost certain that it has happened to someone somewhere in the world. You will need to stop as quickly as possible. As you have no directional control this will probably easiest if you just skid to a halt - but check behind first!
Steering can sometimes pull to one side... The most common cause of this is a soft tyre. If your tyres are OK get your steering checked immediately.
Jammed steering lock
Usually the steering lock can be released by gently turning the wheel from side to side but occasionally the lock will jam completely. A common cause is that the load on the steering prevents enough movement to free the lock.
There are two possible solutions.
Move the car about a metre by pushing or letting it roll (if you are on a hill beware: the brakes may need to be pressed much harder than usual with the engine switched off).
or: Jack up the front of the car lifting both wheels off the ground.
One or other of the methods above will remove the load on the steering and allow enough movement for the lock to be released normally.
If these fixes do not work you need a mechanic!
Stay calm - stay safe!