When you get constipated, passing hard stools cause tearing of area inside of your anal opening. It doesn't cause a lot of bleeding but little amount of blood comes out mixed with stools or lining the stools and its bright red in colour. Also sometimes a localised swelling/ lump develops just below the tear ( called sentinel pile) which will be felt only when you are constipated and the pain may extend upto a few hours after passing stools.
Next Steps
You should avoid constipation at all costs as it is the main cause of fissures. Eat fibre rich food, drink atleast 2-3 litres of water per day, exercise everyday. If you are having much pain then do sitz bath twice a day for 20-30 minutes as it will help you relax your anal sphincter(opening) and for further treatment, consult a doctor.