There are some excellent recently developed (last 10 years or so) topical anti-fungal treatments (ointments and creams).
However, for severe infections, particularly of large nails, a course of anti-fungal antibiotic tablets may be needed.
In both cases, treatment is often needed for several weeks, and should be used in conjunction with careful trimming of the affected nail together with scrupulous washing and drying, with attention to towel and footwear hygeine.
After completion of the course of treatment, it may take several months for regrowth of the nail and complete elimination of the fungus. Recurrence of infection is frequent and should be retreated early.
Contact your doctor for more information and for advise on which treatment would be appropriate for you.