What is tha cause of a painful bump near tha anal area?

Abscess likely. There are several possibilities, but one of the most common is a peri-anal abscess. These usually start with an area of painful redness, then form a hard knot. If left alone, they will eventually pop open and drain pus. The standard treatment is to drain these either in hospital or your doctors office. Since diabetics are most commonly affected, this should be checked as well.
Various. There are multiple possibilities including: thrombosed external hemorrhoid, pilonidal cyst, peri-rectal abscess, herpes, etc. Some of these will get better with time, some require medical or surgical treatment. Get it checked by a doctor.