Recall that an object in a bound orbit has a negative total energy. In order for the object to just escape from that bound orbit, it must have a total energy of 0. (An energy greater than 0 would mean it would have "extra" energy left over after escaping from the bound orbit, in the form of kinetic energy.)
Since , you can solve for the "escape velocity" by setting E=0.
Don't forget that the M in the equation is the mass about which the orbit occurs. In this case, that's the mass of the Earth.