Suppose a constant tangential force is applied to the surface of a liquid. Under this shearing force, the liquid begins to flow. The motion of a thin layer of the liquid at the surface, relative to a layer below, is opposed by fluid friction.
Because of this internal fluid friction, horizontal layers of the liquid flow with varying velocities.
This also happens in a gas. When a solid surface is moved through a gas, a thin layer of the gas moves with the surface. But its motion relative to a layer away is opposed by fluid friction.
The resistance to relative motion between the adjacent layers of a fluid is known as viscosity.
It is a property of the fluid. The resistive force in fluid motion is called the viscous drag.