Piles are collections of tissue and vein that become inflamed and swollen. The size ofpiles can vary, and they are found inside or outside the anus. Piles occur due to chronic constipation, chronic diarrhea, lifting heavy weights, pregnancy, or straining when passing a stool.