Use this phrase to describe what to do if a certain situation happens. This formal phrase is often written on signs and instructions to explain what to do in emergency situations. For example, some buses have this sign on one of their windows:
In case of emergency, pull lever and push out.
You can also use "in case of ___" at the end of a sentence like this:
I like to keep around a few days' supply of bottled water and canned food in case of emergencies.
And there's also a less formal version, "in case (somebody) (does something)" that you use for talking about things that aren't emergencies:
Why don't you take some snacks with you in case you get hungry?