I’ve been getting these hard bumps on my butt and back of thighs, it seemed to happened right after I shaved but they have been there for over a week and just now going away because I used tea tree oil on them.?

These may be. infected hair follicles. Insure you use fresh, sharp blades vice dull blades. Wash area before shaving – warm water helps to soften hair. Use a lubricant when shaving. Avoid using products that contain alcohol or are scented. Shave in direction of the hair – not against it. Be gentle.