If a body is at rest on a horizontal surface and no external force is acting on it, friction won't act on the body. However, if the body is moving relative to the surface, friction will come into play.
If there is any force acting on the body but the body is still in rest, then also friction will be acting on the body in the form of static friction. Here, since the box is moving with a velocity v relative to the surface, friction will act opposite to the direction of box's motion.