Draining is an effect that withers its victim, reducing their general effectiveness. Its exact effect varies depending on the target.
Draining can come from necromantic effects, from certain divine abilities, or from removing items with the *Drain ego.
When used against susceptible monsters, it inflicts the Drained status effect, causing the creature to function as though it had fewer HD than it actually does. This reduces the strength of their attacks and spells, as well as reducing their magic resistance. This status effect can be stacked through multiple hits, but will wear off over time.
Draining effects directed against the player will reduce all of their skills by an amount proportional to the amount of draining you've sustained. At low levels of draining, this might amount to a penalty of half a skill level; at extreme levels, you could be drained all the way to 0 skills.
These drained skill levels will be restored as you gain experience, eventually being cured entirely. The worse the drain, the longer it'll take to work off the effect, especially once you realize that your attacks may now be weaker and slower, and some of your best spells may no longer be available.
Draining from the brand and spells count as necromancy, and as such can be reduced with negative energy resistance; damage and draining are reduced by 50/75/100%, depending on how many ranks of resistance you have.
Draining from item egos and god effects are not related to negative energy, and cannot be resisted (they will even affect undead players).
Priot to 0.16, negative resistance lowered draining and negative damage by 33/66/100% as your resistance increased.
Prior to 0.13, getting drained would damage your character's experience, potentially forcing you down a level. This was permanent, but you could simply gain more experience to make up for it. This had no impact on your skills.