Ask one guard what the other guard would say if you asked them which door to go through, and then go through the other door.
So, for example, if you ask the lieing guard what the truth telling guard would say, he'd lie and say that the truth telling guard would tell you to go through the wrong door.
If you asked the truth telling one what the lieing one would say, he'd tell you the truth, that the lieing guard would ask you to go through the wrong door. That way, the correct door is whichever one they don't say.
Simple one, there are 3 lightbulbs in a room and 3 switches on the outside of the room, but you don't know which switch operate which lightbulb. The switches can only be turned on or off when the door is closed and you can only open the door once (whether a light is on or not). You can turn the lights on and off as many times as you like until you open the door in which case you cannot use the switches again. How do you know which lightbulb is attatched to which switch.
Oh, and these are wall switches, so no silly answers like following the wires. No windows either, this is not a trick question like that, but it does require some lateral thinking.