Onychomycosis is the medical term for nail fungus. However, not all what would appear to be nail fungus is actually nail fungus. A good portion of the time, it may actually be nail trauma. Your physician will obtain an accurate history from you to see if it is the former or the latter.
If it is nail fungus, topical agents vs oral agents will be decided on. A caveat to the oral agents is that it may elevate liver enzymes, and if a patient drinks alcohol or has liver disease the oral agent may not be advised. If it is determined that the nail disease is more trauma, then a topical is prescribed, which is different from the topical antifungal. This topical thins out the nail so it grows clear.