Treatment for nail infections depends on how severe the infection is and the type of infection. Sometimes thoroughly cleaning the nails over a period of months will get rid of an infection. Soaking the infected nail in warm water three times a day may also help. Other times, medical treatment is needed.