...
James Goodwin/Demand Media

Painful, discolored nails are often the first sign of nail fungus infection, or onychomycosis. The nails may thicken, smell bad, or become flaky, causing discomfort to the sufferer. Nail fungus is caused by bacteria that form under the nail, gaining access by breaks in the skin. Dampness encourages bacterial growth, and can cause nail fungus to spread quickly. A home remedy for nail fungus is rubbing alcohol, which is known for its sterilization properties, and may be tried at the first stages of nail fungus infection.

...
James Goodwin/Demand Media

Clean the affected nails with warm, soapy water. Scrub underneath the nails with a nail brush to remove dirt and to expose the bacteria.

...
James Goodwin/Demand Media

Dry the nails thoroughly with a clean towel. Check for any breaks in the skin, which allow bacteria access to your nails and may sting when rubbing alcohol is applied.

...
James Goodwin/Demand Media

Pour rubbing alcohol into a bowl and soak your nails for twenty minutes twice daily. This will give the alcohol plenty of time to reach the nail fungus bacteria.

...
James Goodwin/Demand Media

Clean all objects used to treat your nail fungus. Nail fungus is contagious, and can return to your nails if the same objects are used repeatedly.

...
James Goodwin/Demand Media

Repeat as necessary over the course of two weeks to eliminate the nail fungus. Observe the pattern of nail fungus growth, and see a doctor if the fungus does not clear up, or if the pain increases. If the fungus is not treated topically before it begins to release spores, you may need an oral medication to get rid of the nail fungus permanently.