The theory that explains how life arose from non-living matter is abiogenesis. It proposes that life emerged through a gradual series of chemical and biological transitions on the early Earth, rather than appearing as a fully formed organism in a single step.
Research into abiogenesis examines how simple molecules could have formed organic compounds, how those compounds might have concentrated and reacted, and how systems capable of self-replication and inheritance could have developed. Proposed settings include shallow ponds, hydrothermal vents, mineral surfaces, and other environments that supplied energy and chemical ingredients.
Abiogenesis is a broad research problem, not one universally accepted detailed pathway. Scientists have produced organic molecules and primitive cell-like structures under plausible conditions, but the complete transition from chemistry to the first life has not been directly observed.
Panspermia is different: it suggests that life or its building blocks arrived from elsewhere in space, without explaining the ultimate origin of life. Biogenesis means life comes from existing life, while spontaneous generation is an outdated historical belief that complex organisms routinely arise from non-living material today.