Getting rid of a fungal infection is not that difficult. Your doctor may decide to scrape a small amount of the irritated skin or clip off a piece of hair or nail and look at it under a microscope. Once your doctor knows what kind of infection you have, there are special antifungal creams and shampoos that can help to get rid of it. Sometimes the doctor will prescribe a medicine to take. Make sure you take the medicine for as long as the doctor tells you.