Thick, discolored toenails may be caused by fungal infections. Over-the-counter antifungal creams or prescription oral medications can treat toenail fungus. Keeping the nails trimmed and wearing breathable socks and shoes can help prevent recurrence.