What could force Earth to leave the Solar System? Is it theoretically possible? I'm thinking of some possible ways, e.g 1) large enough asteroid hitting Earth; 2) asteroid, with bigger mass than Earth, with a high velocity passing very near Earth.
 A: The most likely near-term cause of Earth being flung out of the solar system is a chaotic instability of the orbits of the inner solar system. Basically, Jupiter can in principle (it is fairly unlikely) cause Mercury's eccentricity to skyrocket, making it destabilize other orbits. Most of these simulation results merely mess up Earth's orbit or cause collisions rather than ejections. So the risk is $\ll$ 1% per Gyr. 
Assuming Earth is not engulfed by the sun in 5 Gyr, sooner or later there will be a close stellar encounter. If a star passed within one AU it is fairly likely Earth might be ejected. We can model this timescale by assuming a 1 AU disk around Earth sweeping out a cylinder as the sun moves through the galaxy (it is actually twisted because of the orbit around the sun, but we can ignore that). We should expect an encounter on a timescale when that cylinder has a volume that times the stellar density gives a value $\approx 1$. That is, $$\tau_{encounter}=\frac{1}{\pi \rho v r^2}$$ where $\rho\sim$ 0.1 per cubic parsec, $v\approx $ 100 km/s, and $r=$ 1 AU. This gives a timescale of $\tau_{encounter}=1.3\times 10^{15}$ years. 
Black holes and neutron stars would have $r$ in the AU range, but are much rarer than normal stars.
Smaller objects like rogue interstellar planets could do it too, but have far smaller $r$. My guesstimate is that they have a density 10-1000 times the stars (likely on the lower side) and $r\approx $ 53 million km (Jupiter's Hill sphere). That gives a timescale from $10^{20}$ to $10^{22}$ years. 
A: Theoretically possible? Absolutely! To leave solar orbit, you just have to speed Earth up to Solar Escape Velocity ($v_{se}$). This is about 42 km/s. The Earth's current orbital velocity is about 30 km/s. So the good news is that you don't need to speed it up all that much ($\Delta{v} \approx$ 12 km/s).
A collision would not work - the amount of energy required to do this is very large. If you dumped it all at once, it would disintegrate the planet. It's a bit like throwing a custard pie - if you hit it with a baseball bat, it'll splatter everywhere. You need to push (or pull) it steadily and slowly.
So what you need is a (gravitationally) large object - something like a black hole or a neutron star or even just a drifting gas giant like an errant Jupiter. This has to come sailing through the solar system at some large, but not too large velocity (greater than $v_{se}$). It then has to come very close to the Earth, without tearing Earth apart due to tidal forces, and then to plough on out into interstellar space. Earth falls in behind this interloper and is towed along by its gravitational field picking up speed as it "falls" towards it. The interloper is always travelling faster than Earth and so the Earth never hits it (this is a gravitational slingshot manoeuver).
Once we get above 42 km/s, Earth drifts slowly out into the void (you can easily calculate how long to get to Mars, Jupiter, Pluto and so on...). By the way, although we don't actually disintegrate due to tidal forces during the acceleration phase, there would be significant tectonic activity.
Addendum: I did a quick one-page paper/pencil calculation, assuming an interloper of same mass as the sun, the Roche limit is about 500,000 km, which is just a bit more than the lunar orbit. So there should be no danger of disintegration. For a close approach of a few million clicks, the vagabond star would completely dominate us gravitationally and the trick would be to avoid falling into it. For example, if we spent only 1 month at a mean distance of 50 million km from it, we would pick up a $\Delta{v}$ of the order of 100 km/s - which would shoot us out into space in very short order indeed!
A: s it theoretically possible? I'm thinking of some possible ways... e.g 1)Large enough asteroid hitting earth. 2)Asteroid, with bigger mass than earth, with a very big velocity passing earth very near.
Or in the unlikely event the sun suddenly disappeared 
