I know it sounds funny, but I can think of different issues for each of your concerns. I'm not thinking of too much that correlates with each other.
The CD player is likely a stand alone issue - either a loose connection causing a power loss, or an internal failure. Does the radio work when the CD doesn't work?
The window is likely an intermittent motor or switch issue.
The door lock is likely a switch issue.
The headlight is likely an overheating switch with a possible melted wiring connector.
...and all of this is purely an educated guess and largely speculative. Only testing will give you the real answers. Good luck.