If a passing star came near the solar system, Earth would probably be fine – but there is a small chance our entire world could get thrown to the outer reaches of the solar system, crash into another planet or even get stolen by the wandering star. The other planets in the solar system could suffer similar fates, and Mercury in particular would be at risk of falling into the sun.
About a billion years from now, the sun’s evolution will have proceeded enough that our solar system’s habitable…