An inguinal hernia occurs when tissue, such as part of the intestine, protrudes through a weak spot in the abdominal muscles.