Most drivers will at some point encounter an emergency vehicle while driving; this can often cause a panic reaction in an attempt to get out of the way which could actually make the situation worse for the driver of the emergency vehicle.
What the Highway Code says
This is what the Highway Code has to say with Rule 219:
Emergency and Incident Support vehicles. You should look and listen for ambulances, fire engines, police, doctors or other emergency vehicles using flashing blue, red or green lights and sirens or flashing headlights, or Highways Agency Traffic Officer and Incident Support vehicles using flashing amber lights. When one approaches do not panic. Consider the route of such a vehicle and take appropriate action to let it pass, while complying with all traffic signs. If necessary, pull to the side of the road and stop, but try to avoid stopping before the brow of a hill, a bend or narrow section of road. Do not endanger yourself, other road users or pedestrians and avoid mounting the kerb. Do not brake harshly on approach to a junction or roundabout, as a following vehicle may not have the same view as you.
Note the advice 'Do not endanger yourself, other road users or pedestrians and avoid mounting the kerb'.
The emergency services drivers are trained to deal with traffic situations and do not wish to endanger anyone else or cause them to break the law.
Try to anticipate where the emergency vehicle will be going; look for the driver using their direction indicators.
Pulling over and stopping in some cases may not be the best course of action if it could block the path of the emergency vehicle or put them or others in danger trying to go around you.
The emergency services themselves have created a very informative video showing what they do and how other drivers should react.