I have fungus on one toe on my left foot, but it hasn't spread. It hurts only if I touch it. What is an effective way to eliminate the fungus?

Acute athlete's foot. The first thing that comes to mind is that this is one of the presentations of acute athlete's foot. Use drying soaks (epsom salts or dilute vinegar) and a topical antifungal... I prefer patients use lotrimin ultra or Lamisil (terbinafine) cream. You can use certain-dry pads or solutions to decrease perspiration. If this doesn't work, see a podiatrist and be sure to inform them of what you have tried already.
Topical antifungal. If it is truly fungal a topical antifungal for 2 weeks should do the trick. If not resolved in 2 weeks see a podiatrist for help.