An inguinal hernia occurs when tissue or organs protrude through a weak spot in the abdominal muscles, typically near the groin area.