You can only ask one guard one question, but you have two variables - whether the guard is lying or telling the truth, and which door is the correct one. Just as you cannot solve a single equation with two unknowns, you cannot resolve both variables with a single question. So how do you remove one of the variables? You cannot remove the variable of which door is the correct one, since that is the variable you want to find out the answer to. So you have to remove the variable of which guard is telling the truth and which one is lying. How do you do that? You ask one guard what the other guard would answer. You know the answer will always be a lie.
For example:
You ask one guard how the other guard would answer the question "Is the sky blue?" If you've asked the truthful guard, he would truthfully answer that the lying guard would lie and say "No". If you've asked the lying guard, he would lie and tell you that the truthful guard would say "No". The answer will always be a lie.
So now you can ask either guard if the other guard would say the first door leads to the prize. The answer will always be a lie. So if the answer is no, you take the first door. If it is yes, you take the second door.