This is an old one. There are two doorways, one leads to certain death, the other means you are allowed to live. Two guards are guarding the doors - one of them always tells the truth, the other one always tells lies.
You are allowed to ask one question to determine which will lead you to safety - what is the one question you could ask either guard and know for certain which door to choose?.