There are two types of hernias, congenital and acquired.
Inguinal hernias and femoral hernias are congenital defects (You are born with the defect in the fascia , the lining around your abdominal cavities.) Heavy lifting with increased intrabdominal pressure brings it out. (Ie: you valsalva or strain against high intrabdominal pressure and thus "push' the intestines throught the fascial defect.) If you aren't born with the defect, all the lifting in the world won't give you a inguinal or femoral hernia...a bad back but no hernia.
Acquired hernias or non -congenital hernias are usually due to previous surgeries (incisional hernias) where they have cut throught the fascia and despite stitches, become inherently weak . Pregnancy can thin the fascia to the point where they rip in pregnant women. High doses of cortisone orally also thin the fascia and predispose people to hernias. Most of these types of hernias are direct abdominal hernias or above the inguinal canal, .
Strenghthening the abdominal muscles not only prevent these, but also "cure them" without surgery, so to speak. Ie: the rectus abdominal muscles become the replacement "mesh" over the defected facia. I have one of these and have always had to keep my abdominal muscles tight so that I can forgoe surgery. (I had the inguinal ones when I was young)
Umbilical hernias (around the bellybutton) is usually congenital but sometimes it is acquired. In pregnant women, that's the apex of greatest stretching force on the fascia when carrying a baby and a umbilical hernia can form as the belly gets bigger.
Then, there are all subtypes that surgeons are really into but I will leave that to them here is a link....
http://www.emedicine.com/emerg/topic251.htm
Of course, you don't know if you are congenitally predisposed so avoid any valsalva manuever when lifting (ie: use good breathing technique) and don't throw out your back in the meantime!