To prevent them get a headlice comb and comb your hair regualarly after using a conditioner. They can't stick to the hair.
To eliminate an infestation the best thing is to go to your pharmacy and ask them for a headlice neautralising lotion
Headlice are spread through head to head contact and sharing a hairbrush so try to avoid that if you can
