I have a 95 Chevy S10.
When I drive my truck around at night I notice that occasionally my headlights turn off for about 3 seconds and then come back on by themselves. There doesn't seem to be any kind of consistency to it. It does it when I'm driving, when I'm sitting, even when the engine is turned off. It made a clicking sound a couple of times too if I remember rightly.
Tonight I drove again and it got so bad that they wouldn't stay on for more than a few seconds and since I've been wiggling the wires behind the headlight switch they haven't yet come back. I don't know for sure if wiggling had any effect or not though or if it was coincidental (Wiggling didn't cause any flickering). When I wiggled the wire connector thingy that leads into the headlights switch I noticed that it was hot which didn't seem right to me.
When I drove home I tried to turn them off then on again until it worked, but I don't know if it came back (when it did come back) because of that. (I mention that as a possible explanation for the hot connector.)
The daytime running lamps stay on (or at least I think they are the DRL's, (they're yellow)).
Some other details that could be related although may be entirely unrelated are that both the fog lights and the dashboard lights that light up the meters haven't ever worked since I bought the thing a couple months ago (e-brake, check engine etc lights still work though). The reason I mention it is because both of these are also switches next to the headlight switch and connect in the same general area.
Being that I know very little about vehicles I wiggled some random wires near the headlights themselves and near the battery and it had no effect. I'm assuming it's something in the wiring in the cab.