How to deal with a cat's oily tail
Cats have well-developed sebaceous glands at the base of their tails, which secrete a lot of oily substances, making their tails very easy to get dirty. This is especially true for long-haired breeds, which get even dirtier, and if left untreated, it can develop into dermatitis. 
If your cat's tail gets oily, you can wash it regularly with an oil-removing shampoo, blow-dry its fur afterward, and brush its fur daily to help reduce the oiliness.
If you can't remove the oil stains with shower gel or any bath product, you can simply shave off the hair on the tail and let new hair grow in.
Male cats' tails are generally oilier than female cats', especially unneutered males, and they may also have an unpleasant odor. Neutering or spaying can alleviate this problem.