Your doctor may be able to tell that you have a fungal nail infection just by looking at your toes or your fingers. But they may do some tests to be sure.
He may decide to take a sample of your nails. The clippings can be tested to see if fungus is in them.
If you do have nail fungus, you and your doctor will decide what treatment is best for you.
From: How Do I Know Whether It's a Fungal Nail Infection or Something Else? WebMD Medical Reference