It is probably a fissure which is a small break in your anal mucosa. Is there any bleeding?
Next Steps
Sit in a basin of warm water for about 15 mins twice a day. Take plenty of oral fluids and fiber ( fruits vegetables or over the counter fiber supplement such as isabgol). If not resolving may need some topical ointments which can be prescribed by a doctor.
Health Tips
use Indian closet if available . if using a European closet, use a small stool to prop up your legs so that the angle between your trunk and thighs is around 35 degrees.