When we throw an object in the atmosphere, it falls back to the surface of the earth after reaching to a certain height depending on the velocity given to it. If we throw the object with a velocity so that it overcomes the gravitational pull then such velocity is known as escape velocity and the object will never return to the surface of the earth.
The minimum velocity with which a body is projected in the atmosphere so that it escapes the gravitational field of the earth is known as escape velocity.
Consider earth to be a uniform sphere of radius

The gravitational force of the earth on the object is,
Then, the small work done to move the object through infinitesimally small distance
Integrating within limits from
To escape the gravitational field, the potential energy is converted into kinetic energy.
If
We have,
This gives the escape velocity.
For earth,
Thus, escape velocity of the earth is