Based on the symptoms you have described it seems that you have a fissure. A fissure is a small internal tear at the anus. You need to start taking stool softeners . in would recommend to start psyllium
husk with water. You can usebtopical xylocain ointment for the pain. Pleale consult a doctor and get examined to confirm the diagnosis.