it's hurts when I have a bowel movement

For a little while now it hurts really bad while I'm having a bowel movement and I have to lay down for like ten minutes afterward because I'm in such pain. I don't understand why... can anyone give me any tips on how to soothe it or stop it from being so painful? I did give birth 6 months ago but I don't know if that has anything to do with it.