万が一 means "in the unlikely event that": literally "one in ten thousand", a possibility remote but serious enough to plan for. It opens a condition, so the clause it starts ends in , , or .
、。
In the unlikely event of a fire, use this emergency exit.
、。
If by any chance it rains, the game will be called off.
、。
Even if you do fail the exam, you can just try again.
As a noun: 万が一の場合, 万が一に備えて
万が一 can stand as a noun for the unlikely event itself. It takes の before another noun, and and mean "just in case".
、。
Let's keep some emergency food in case the worst happens.
、。
I made a copy of my passport just in case.
is a soft way of naming an accident or a death without saying it.
、。
If anything should happen, call this number.
万が一 or もし
is a plain "if". 万が一 adds that the thing is very unlikely, and that it would be bad if it happened, so it suits warnings, emergencies and precautions.
、。
If you have time, please help.
、。
If by some chance I'm not there in time, please start without me.
(まんいち) is a shorter form of the same word, more usual in writing.