It can be piles or fissure. It can be only decided after examining.
Next Steps
It is better to get it checked by a doctor for better diagnosis.
Health Tips
If bleeding and pain is issue. Avoid food articles that can cause constipation (or make stools hard) while increase use of natural laxatives like milk, curd, banana, papaya, oranges etc.