Unless you have injured your nails, they probably are discolored because of a chronic resistant infection. These infections are due to various types of fungus that grow under the nails.
These fungi actually live on nail tissue and its surrounding debris causing discolored nails. If not carefully dealt with, they multiply and infect more and more of the nail. Just as with teeth, the longer the nail infection is allowed to continue, the more the nail is damaged. In fact, if neglected too long, the whole nail may need to be permanently removed.
The nail weakens as fungi continues to grow through the nail tissue. It becomes brittle and easily cracked or broken. Larger and larger cavities are eaten out of the nail substance. The nail becomes partly detached from the nail bed. Since fungus grows faster than the nail, damage increases and the nail becomes more and more unsightly with the infection spreading to the root or base of the nail. It is, therefore, important that treatment be started before the infection spreads to the matrix or root of the nail. Generally, the fungus spreads from one nail to another or to the skin causing “athlete’s foot.” All nails eventually may become involved.