Most attacks will merely reduce a target's Hit Points, but some can also inflict a more lingering form of damage - Ability Damage. The most common source of Ability Damage is poison, but diseases, curses and spells can also cause this damage.
As the name implies, Ability Damage will reduce one of a character's Ability Scores. Ability Damage tends to be relatively low, compared to Hit Points, but then again so are most character's Ability Scores, and unlike conventional damage, Ability Damage will reduce a character's effectiveness until it's cured. If a character suffers Strength damage, their Strength score will be lowered, possibly lowering their modifier, which will lower all their derived stats related to that now-reduced ability score.
While frustrating enough when a character suffers Ability Damage to one of their primary ability scores, characters are usually more vulnerable to damage to secondary attributes. Wizards tend to have lower Constitution scores than warriors, and will succumb more quickly to Constitution damage, just as a warrior is usually somewhat deficient in Intelligence. If any ability scores are reduced to zero, that character will become incapacitated until the score is improved. The sole exception to this rule is in the case of Constitution damage - a score of zero is fatal.
Ability Damage can be healed by resting, although it's a much slower process when compared to Hit Points. If you want to remove such damage in any sort of an acceptable time frame, you'll need to make use of Restoration spells or similar healing magics.
Disease and Poison
The two most common sources of Ability Damage are disease and poison (especially the latter - damned Giant Spiders!), and both function similarly. When foes capable of afflicting these statuses successfully attack, the victim will usually be entitled to a Fortitude Save (the DC varies by the virulence of the disease or poison). Should they succeed, they'll suffer no ill effects aside from whatever Hit Point damage the attack inflicts. If they fail, they'll immediately suffer Ability Damage (which also varies according to the nature of the disease or poison) and become diseased or poisoned.
When a character becomes diseased or poisoned, the truly insidious nature of these ailments reveals itself. Not only will you take whatever damage (Hit Point damage, Ability Damage, or both) the initial attack dealt, but you'll take recurring Ability Damage until you finally succeed at a Fortitude Save. Diseases tend to inflict their damage more slowly than poison does, and both can be removed by divine magic should a character's Fortitude Save not be up to snuff. The Ability Damage sustained by the disease or poison is not removed if the disease or poison itself is removed - you'll have to recover such damage independently.
It's worth noting that you will not naturally start healing Ability Damage until the disease or poison causing it is first removed. This information is more relevant for diseases, which tend to be significantly slower about applying Ability Damage than poisons are. It's possible to be inflicted by numerous diseases and/or poisons at the same time.
Curses and Spells
While disease and poison are common sources of Ability Damage, some spells can also inflict Ability Damage. At the outset this Ability Damage is usually temporary - spells like Ray of Enfeeblement, for example, temporarily lower a target's Strength score. Unlike diseases and poisons, spells typically do all their damage up front, pending a failed Saving Throw; unless it's a spell that replicates the effects of disease or poison, of course. Ability Damage from a spell (assuming it's not temporary, in which case it'll be restored when the spell's duration ends) can be cured with rest or restoration spells, as normal.
Curses are somewhat rarer, but they can inflict Ability Damage. In this case, the curse must first be removed (ideally with the Remove Curse divine spell) before the Ability Damage can be cured.