If you throw a ball up it the air, it goes up. The faster you throw it the higher it gets. As the ball rises, the ball slows and the pull of the Earth's gravity gets weaker. At an infinite distance, the pull of the Earth's gravity will be zero, but you do not need to throw the ball at an infinite speed to reach this infinite distance. You only need to throw the ball uo at a speed greater than the escape speed, as shown below.
We can see this by considering energy. The gravitational potential energy for a body of massat a distancefrom a spherically symmetric body of massisIf the body is thrown with a speedjust sufficient to escape the gravitational field of the body, then when this is just done the body will have no energy at all, so
This is the expression for the escape speed so