Why in the formula to get the escape velocity $v_f$ is $0$? The formula to get the escape velocity is:
$$K_i + U_i = K + U$$
$$\frac{1}{2}mv^2_i-G\frac{mM}{R^2} = \frac{1}{2}mv^2-G\frac{mM}{r_\infty}$$
$$\frac{1}{2}mv^2_i-G\frac{mM}{R^2} = 0$$
My question is: why is the final speed equal to $0$? If in our system we take an infinite distance to get $U = 0$, shouldn't the velocity be a costant?
 A: This gives you the minimum velocity you need to get to "infinity". Of course you can include some speed at "infinity", and you will find that you will need a larger initial velocity to make that happen. But the escape velocity is the bare minimum you need to escape the effects of the gravitational field.
Also, note that $0$ is a constant as well :)
A: The escape velocity is the minimum velocity required by an object to just reach to infinity where final velocity of the escaped object becomes zero. But if velocity at infinity in non-zero then the required escape velocity will be more than the minimum escape velocity $v_{min}$ which can be computed by
$$\frac{1}{2}mv^2_{min}-G\frac{mM}{R^2} = 0$$ 
A: The velocity that you get from this formula:
1$/$2$mv_i ²$ $-$ $GMm/R$ $=$ $0$
The velocity obtained from above formula is the minimum velocity required to take an object to infinity. It implies that if you impart this much of velocity to an object kept on earth's surface, its total mechanical energy would become zero and it will reach infinity. 
As you can see that an object can have zero total mechanical energy when it is at rest($i.e.$ zero kinetic energy) and is present at infinity($i.e.$ zero potential energy). 
