Getting rid of lice requires determination, equipment, and concerted effort. You probably will need some help, at least for the hair lice. Find some sympathetic soul who has the time to do a thorough job in helping you.
First get rid of the nits. If you soak the scalp with dish detergent it will loosen the cement that holds the nits to the hair.
Then with a metal nit brush, obtainable at the pharmacy, carefully go over all the hair next to the scalp, thoroughly removing all the nits. Expect that you do not see them all and cover all the scalp. If the hair is thick, repeat the whole procedure.
Then, use a preparation that will kill all of the living lice left behind in the nit cleaning process. Clean up all the places where you have put your head and hair such as pillows and other bedding, hats and scarves and regular clothing. Thoroughly launder all such items. Use the louse-killing preparation in all of these places. It is hard to be too thorough.
A week later, repeat the entire procedure. This may do the job, but don’t be too sure. Keep careful watch for tell-tell signs that you didn’t get all the lice. If they show up again, repeat the two week treatment.