The frictional force is a contact force that acts in the opposite direction to the motion of an object. This force can cause objects in motion to come to rest, as they act in the opposite direction to its motion.
E.g. - If you roll a ball on a surface, it would come to rest after a short while. It does not keep on moving, this is due to the frictional force acting in the opposite direction of the motion causing it to stop and come to rest.