I have a 2009 prius with 85k miles on it, bought it two weeks ago, right off the bat I noticed that the left headlight, while driving, will frequently go out. It comes back on when I turn the headlights off and on again, and goes out again later. Sometimes it stays on, other times it goes right out. I took the headlamp off, disconnected all wires, and cleaned it of any corrosion that was found and reconnected it, and the light still went out. Any ideas as to what would be causing this/ what a fix is non mechanic oriented? Worth mentioning that I've noticed condensation build up on the inside of the headlamp occasionally, and one time both lights flickered and then went out, but that hasn't happened since. Thank you!
JC91006 is right, it sounds like you have HID headlights with a bad bulb. They don't "die" like regular halogens, they will flicker off and then come back on when you turn them off then on. I had both of mine go right after we bought it. You can look up the option packages in this PDF to see what package matches your car's options and determine if you have HID lights too. If so, there are instructions on changing them here.