Viscosity is the property of the fluid by virtue of which it opposes relative motion between its different layers. Both liquids and gases exhibit viscosity but liquids are much more viscous than gases.
Pour equal amounts of water and castor oil in two identical funnels. It is observed that water flows out of the funnel very quickly whereas the flow of castor oil is very slow. This is because of the frictional force acting within the liquid. This force offered by the adjacent liquid layers is known as viscous force and the phenomenon is called viscosity.