A congenital hernia is a defect present at birth where an internal organ or tissue protrudes through an abnormal opening in the muscle or wall that normally contains it. It occurs due to incomplete development of the diaphragm, abdominal wall, or other structures during fetal growth.