An ectopic pregnancy occurs when the fertilized egg implants outside the uterus, often in the fallopian tube. This condition is a medical emergency as it can cause severe complications, including internal bleeding and damage to reproductive organs. It requires prompt intervention.