A body that is moving either at a constant speed or otherwise can be brought to a stop by applying a force that accelerates the body in the opposite direction of its present motion.
The acceleration brings the body to a stop in a distance that can be calculated by the use of the following formula: v^2 - u^2 = 2*a*s, where u is the initial velocity, a is the acceleration of the body and s is the distance. As the body has to be brought to a stop, v = 0. This gives the magnitude of displacement or distance as s = u^2/2*a.
The stopping distance therefore depends on the initial velocity of the body and its acceleration due to a force in the opposite direction.