Fiber. The simple answer is diet and fiber. Try to avoid foods that constipated you. Add a fiber supplement powder to your diet. Don't sit on the toilet for extended periods of time. Use a barrier cream or low grade Hydrocortisone cream from time to time as needed. If there is any bleeding, however, you should see your doctor immediately.
Hemorrhoids. Hemorrhoids are swollen veins in the anal canal. This common problem can be painful, but it's usually not serious. http://www.webmd.com/digestive-disorders/tc/hemorrhoids-topic-overview-1#1.