A few years ago I woke up to a cold house. I leaped to the dramatic conclusion that I had a bad gas valve. I spent all day looking for the right replacement, only to find out when I went to remove the “bad” valve that the switch was in the “off” position. I'll never know how it got turned off. But turning it on sure solved the problem.
But never mind the gas valve. Let's think about ordinary wall outlets. What if you have power, the switch is turned on, and whatever you plugged in still doesn't work? Give in and do the easy thing - plug it into a different outlet. And if it still doesn't work? Then ask whether or not everything else in the house or building is working. If nothing else is, or half is, you may have a power outage from the utility. It's odd how big a relief it is to learn that no one around you has power either. It's more than “misery loves company.” The crisis of “Oh, no, I've got a problem” suddenly changes into “Those guys at the utility have a problem.”