Fungal nail infection
A fungal nail infection is four times more likely to develop in a toenail than a fingernail, and while it can look unsightly it is not serious and is rarely painful. A fungal infection can look ugly because the nail often becomes thickened and can turn white, black, yellow or green.
The nail can sometimes become brittle, with pieces of nail breaking off or even coming away from the toe completely. Underneath and around the nail (the nail bed), the skin can sometimes become inflamed and painful, but this tends to suggest a yeast infection. A fungal nail infection is not serious, but it will not clear up on its own and requires treatment with antifungal medicine.
Source: NHS choices