You could have some sort of bacterial infection, or a yeast infection.
Did you cut yourself when shaving hair off, if so the cut could have become infected.
Perhaps you accidentally pulled a hair out when removing hair, again its possible that might have caused a bacterial infection.
You should go to doctor and get area checked out.
Another possibility is that you have an anal fissure, or the glands in your anus have become infected. Best plan to go to doctor.
Ensure you don't get constipated, and you could try using anusol pessaries and cream, which help anal fissures and should help with infection. If this doesn't work, you could try using an anti fungal cream, which the doctor can prescribe.