How does this riddle work?!?

The riddle:

There are two doors: One leads to Heaven, two leads to Hell. There is a guard at each door. One always lies, one always tells the truth. You can only ask the guards one question, what do you ask them?

The Answer:

Is the guard who is telling the truth standing in front of Heaven?

My question:

How does this riddle work. I don't get it. Can someone explain it too me, please!??!
 
Back
Top