Stud tail (also known as supracaudal gland hyperplasia or tail gland hyperplasia) is caused by hypersecretion of the glands in the supracaudal organ (an organ on the base of the tail).
Sebaceous glands secrete oils (known as sebum) which lubricate the skin, preventing dryness and irritation. The sebaceous glands are mostly found in dorsal, eyelids, chin, surface of the base of the tail, lips, scrotum, and prepuce and are connected to the hair follicles.
The glands also play a role in territorial marking and any observant cat owner will have seen their cat rubbing his face and chin along objects. Over time this rubbing will leave greasy patches.
Male hormones increase secretions. This is why stud tail occurs more in entire male cats (known as studs), although it can affect females and desexed (neutered) males also.
Hair at the base of the tail becomes matted and greasy, thin, fall out and develop a rancid odour
Yellow to black, waxy debris on the skin and hairs of the tail base. 
Secondary bacterial folliculitis (inflammation of the hair follicles) may be present
Physical examination can diagnose stud tail.
Treatment of stud tail involves washing twice a day with an antiseborrheic shampoo. Your veterinarian may clip the hair to permit better penetration of the shampoo.