Question: What causes Hemorrhoids ?
Answer: Swelling in the anal or rectal veins causes hemorrhoids. Several factors may cause this swelling, including - chronic constipation or diarrhea - straining during bowel movements - sitting on the toilet for long periods of time - a lack of fiber in the diet Another cause of hemorrhoids is the weakening of the connective tissue in the rectum and anus that occurs with age. Pregnancy can cause hemorrhoids by increasing pressure in the abdomen, which may enlarge the veins in the lower rectum and anus. For most women, hemorrhoids caused by pregnancy disappear after childbirth.
Source: NIDDK

Question: How to diagnose Hemorrhoids ?
Answer: The doctor will examine the anus and rectum to determine whether a person has hemorrhoids. Hemorrhoid symptoms are similar to the symptoms of other anorectal problems, such as fissures, abscesses, warts, and polyps. The doctor will perform a physical exam to look for visible hemorrhoids. A digital rectal exam with a gloved, lubricated finger and an anoscopea hollow, lighted tubemay be performed to view the rectum. A thorough evaluation and proper diagnosis by a doctor is important any time a person notices bleeding from the rectum or blood in the stool. Bleeding may be a symptom of other digestive diseases, including colorectal cancer. Additional exams may be done to rule out other causes of bleeding, especially in people age 40 or older: - Colonoscopy. A flexible, lighted tube called a colonoscope is inserted through the anus, the rectum, and the upper part of the large intestine, called the colon. The colonoscope transmits images of the inside of the rectum and the entire colon. - Sigmoidoscopy. This procedure is similar to colonoscopy, but it uses a shorter tube called a sigmoidoscope and transmits images of the rectum and the sigmoid colon, the lower portion of the colon that empties into the rectum. - Barium enema x ray. A contrast material called barium is inserted into the colon to make the colon more visible in x ray pictures.
Source: NIDDK