Nail fungal infections are quite common. They are not really serious, but they may take a long time to treat. Nail fungal infections often affect your toenails, but they can also occur on your fingernails. They may start on the edge of the nail and spread to the middle. With this condition, the nail becomes discolored and thicker in certain areas. The nail can become brittle and its pieces can break off. The entire nail may also lift off the nail bed, causing pain and swelling in the skin surrounding the affected nail.