Nail infections may be caused by fungi, bacteria, or viruses, the most common of these are nail fungal infections. These happen when fungus gets inside the nail and through small cracks in it as well as in the surrounding skin. This nail fungal infection is known as onychomycosis. Nail infections are more common in older adults compared to children.
Nail fungal infections may cause the nail to thicken, crumble, and discolor, more often becoming white or yellowish and sometimes green or black. This often happens gradually and slowly and it is more often painless. Fungal infections affect the toenails more than the fingernails.