Ectopic pregnancy occurs when a fertilized egg implants outside the uterus, often in the fallopian tube. It’s a medical emergency requiring immediate treatment to prevent complications.