Frictional force between layers of flowing fluid is known as
Viscosity.
Viscosity is often referred to as the thickness/compactness of a fluid. At molecular level, viscosity is a result of the interaction between different molecules in a fluid. This can also be understood as friction between different layers in a fluid.