Earth would have to collide with another planet or an entire star system to become a rogue planet. Stars appear static, yet they travel at incredible speeds of up to 250 kilometers per second, making any encounter even a fraction of this speed lethal.
There might be billions, if not trillions, of rogue planets (planets that do not circle stars) in the Milky Way galaxy. In the video below, Kurzgesagt discusses how the Earth may go rogue (by following a nearby giant star away from the Sun) and what would happen to our oceans, atmosphere, and life if this happened.
The first portion of the video is tragic — “as the days turn dark, the final winter of humanity would begin” — but the second half is positive: we’ll be able to forecast our expulsion thousands of years in advance and may be able to prepare. Given the global response to the pandemic and climate change, it would be fascinating to watch if human civilization could band together to save itself from a harsh end in space.