One of the most common cause for bleeding per rectum is hemorrhoids. There can be other causes too like proctitis, anal fissure, polyps etc. Any bleeding per rectum would need evaluation to know the cause. Your physician would initially do a proctoscopy in his office. Piles and hemorrhoids can be diagnosed by it. Sometimes if the cause is a bit higher and cannot be visualized by proctoscopic examination, a colonoscopy would be advised. This is done by a gastroenterologist. Treatment of piles is to avoid constipation and keep the motions soft by increasing dietary fiber and drinking plenty of fluids and water.
Read here in these resources;
Please feel free for your follow up questions.