whats cause my headlights(lows and highs)to go out and not want to turn on? on 2002 Kia Spectra

one night i was driving home my lows went out and would not turn on. i used my highs to get home next morning i checked my fuses it was burned out, i replaced it my lights were working fine 2 days. yesterday when i gave a friend a ride home the went again i was able use my highs i checked and replaced the fuse. and start to head home i didn't make to the end of blockand they went out again but this time my highs wouldn't work. so carefully drove back to my friends house

Asked by for the 2002 Kia Spectra