Constipation is when you can't make poopies as much as you should, and when you do expel feces, they will register a good 372 on the Mohs Scale. Can be caused by poor diet, physiological disorders, and opiates. Logical opposite of diarrhea.
If constipated, squat, don't sit, when you shit. This reduces strain on the sphincter and will help the doody come out easier, less painfully, and with less chance of tissue damage. Has the side effect of making the toilet water splash up and hit you in the bum, but that can be fixed by putting a sheet of toilet paper in the bowl before you do the deed. Or not, if that's your thing.
Constipation has a number of pharmaceutical cures, ranging from a simple increase in water and fiber intake to big, bad laxatives like castor oil, milk of magnesia, and DIY enemas.
 Fecal Impaction
This shit is hardcore - literally. Fecal impaction is an advanced stage of constipation where the stool becomes so hard that it gets stuck in the colon and won't come out no matter how hard you strain. If you're lucky, there may be room for liquidized shit to pass around the obstruction. Sound fun? May or may not have killed Elvis.
Symptoms include abdominal pain in the lower left side, hardness in the same area, bloody rectum, and in really bad cases, complete inability to pass gas or liquid stool. In case you were wondering, no, it's not fucking good if this happens, but it'll only be really dangerous if you're old and/or you don't do anything about it for more than a day.
So what the fuck do I do?
Milk of Magnesia, an over-the-counter enema, or, if you're really desperate, put on some latex gloves and pull that shit out. Do not take stimulant laxatives; not only do they take 8 hours to start working, they won't help at all, and might even cause damage to the intestines. Manual removal of an impacted stool can cause extreme pain, so take it slow and easy, use lubricant, and maybe get someone to wait outside and check up with a knock every few minutes if you can stand the embarrasment.
Well, that fucking sucked, how do I not have this happen again?
Eat more fiber and fruit. Drink more water. Lay off cheese and meat for a while. Take stool softeners. Exercise. And above all, think about cutting back on the opiates until your digestive tract has a chance to repair itself. Human beings can survive without a large intestine, but at an educated guess, it probably sucks.