State law and common sense dictate that vehicles yield to emergency vehicles that are operating their emergency lights and siren. Emergency vehicle drivers are taught to pass on the left whenever possible when responding in emergency mode. When safe, slow down, pull over to the right, and stop.
However, there are circumstances where that may not be possible (e.g., your car is already stopped, and you don't have anywhere to pull over). Simply stay put until the emergency vehicle goes around you. If you are blocking the route of the emergency vehicle, and you are able to pull ahead and over into a clear area, use your turn signal to indicate your intentions, and proceed at a safe speed.
If an emergency vehicle is approaching from the opposite direction, you should pull over and stop. You have no idea if they are proceeding down the road, or are planning on turning into a driveway or intersection right in front of you. You are not required to slow down or pull over for emergency vehicles that are responding in the opposite direction on a divided highway.
Never slam on the brakes and stop in the middle of the road when you see emergency vehicles approaching. Make no sudden moves.