In order to leave the Solar System, the probe needs to reach the local escape velocity. After leaving Earth, the Sun's escape velocity is 42.1 km/s. In order to reach this speed, it is highly advantageous to also use the orbital speed of the Earth around the Sun, which is 29.78 km/s. By later passing near a planet, a probe can gain extra speed with a gravity assist.