Planets form from dust around young stars and grow through collisions. Their lifespan depends largely on their star. Earth may last about 9.5 billion years before the Sun makes it uninhabitable. Planets orbiting red dwarf stars could remain stable for billions to tens of billions of years. Eventually, planets may be destroyed, ejected, or altered beyond recognition.