See a doctor. Ths is important. There are many explanations, and the most likely is that you have piles, particulary if the blood is bright red, but it is very important to see a doctor as the explanation could be much more serious.
if you are very worried then please go and see a doctor. It could be piles, a tear but could also be something serious. Dont be alarmed a GP will take details and may not need to examine you at all.