Problem with headlights

I have a '92 Chevy Cavalier. I left the lights on one day and needed a jump. When I got home, the dashlights would not go off, so I disconnected the battery to reset the lights, and put the cable back on. That night when I started to leave, the headlights come on when it was put into gear as they are supposed to, but when I turned the lights on, the headlights went off. I tried restarting a couple of time, but they would not come on with the car in gear. I borrowed my daughter’s carto go to work. The next day I took it to a garage, but the lights were now working, so I said thank you and left. The problem has now come back intermittantly. They will work 2 or 3 days, and then not work. I have found that if they go off, I can turn on the bright lights, and they will work. After driving a few minutes, I can turn off the bright lights, and the headlights stay on. When the lights are on, they are solid, no flickering.