In the scenario you described, where an object moves along a smooth surface without any force applied on it, the absence of friction is due to the lack of an external force acting on the object. Friction is a force that opposes the relative motion or attempted motion between two surfaces in contact. When there are no external forces acting on an object, it will continue to move with a constant velocity in a straight line, as dictated by Newton's first law of motion (the law of inertia). In this situation, there is no need for any force to maintain the motion, and therefore there is no friction.
However, when an external force is applied to the object, such as pushing or pulling it, friction comes into play. When two surfaces are in contact, even seemingly smooth surfaces have microscopic irregularities and roughness. When an external force is applied, these irregularities can interlock or interact, resulting in a resistive force called friction. Friction opposes the motion and tends to bring the object to a stop or reduce its velocity.
The magnitude of friction depends on factors such as the nature of the surfaces in contact, the normal force (the force perpendicular to the contact surface), and the roughness or smoothness of the surfaces. Different types of friction, such as static friction (when there is no relative motion between the surfaces) and kinetic friction (when there is relative motion), come into play depending on the circumstances.
In summary, the presence or absence of an external force determines whether or not friction is involved. When no external force is acting, there is no need for friction to maintain the object's motion. But when a force is applied, friction arises as a result of the interaction between the surfaces in contact.