Nail fungal infections are typically caused by a fungus that belongs to a group of fungi called dermatophytes. They can invade your skin through tiny invisible cuts or through a small separation between your nail and nail bed. They cause problems only if your nails are continually exposed to warmth and moisture