Oceans come and go over hundreds of millions of years. New ones are born when continents are ripped apart, allowing hot magma to bubble up and solidify into oceanic crust. They die when continents collide and force oceanic crust back down into the mantle.
An enduring geological mystery, though, is how the ocean-swallowing subduction zones form in the first place. Oceanic crust cools and becomes more dense as it ages, so older crust may spontaneously buckle, sink into the mantle and form a subduction zone. But older crust is also stronger and more rigid – features that should prevent it either buckling or subducting.