The moving vehicle and its occupants, or the moving bicycle and its rider losses some kinetic energy. When they are stopped, the kinetic energy becomes zero. Where has the original kinetic energy gone? In a vehicle or bicycle, it is the brakes that absorbs the energy by friction, converting it into heat, which is them dissipated to the surrounding.
As energy is absorbed , the vehicle us slowed down until it finally comes to a stop. In addition , the brakes must bring the vehicle to stop in a smooth manner and in a straight line. There must be no skidding.