Anal bleeding when your using the toilet?

When i sometimes use the toilet to #2 its somewhat painful and it bleeds down there. What could this be?