Swollen blood vessels within or close to the anus and rectum are removed during piles surgery. Hemorrhoids are the medical term for these enlarged veins.