Viscosity is a measure of the resistance of a fluid which is being deformed by either shear stress or extensional stress. In general terms it is the resistance of a liquid to flow, or its "thickness".
Viscosity describes a fluid's internal resistance to flow and may be thought of as a measure of fluid friction. Thus, water is "thin", having a lower viscosity, while vegetable oil is "thick" having a higher viscosity. All real fluids have some resistance to stress, but a fluid which has no resistance to shear stress is known as an ideal fluid or inviscid fluid. The study of viscosity is known as rheology.
In designing piping and pumping systems, petroleum engineers begin with a determination of the viscosity of the fluid to be handled. A system that might work well for a highly viscous fluid, like crude oil, might not work at all for a less viscous fluid like alcohol.
See also PEI/RP700.