We will discuss viscosity as it is applicable to friction, or how it relates to lubricants. For our purposes, we will consider the most typical lubricants, fluids. Friction between two surfaces, or the resistance to sliding between two surfaces results in shearing forces. When a lubricat is applied between the two surfaces, the lubricant is acted on directly instead of the surfaces acting on each other directly (at least this is the case if your lubricant is doing its job). Fluids do not support a shearing force but they are resistant to shearing forces. The resistance to shearing force that a fluid exterts is a form of internal friction, molecular friction, which is known as viscosity. Viscosity is due to the frictional force that occurs when layers of the fluid slip over each other. Concider two pieces of metal with a thin film of fluid between them, say oil. Hold one piece of metal stationary and slide the other, its easy! Now lets separate the two pieces of metal with another liquid say, tar, its not quite as easy to slide one piece of metal over the other now. There is a greater frictional force impeding our sliding with the tar than there was with the oil. Thus, the tar has a higher viscosity than the oil does.
Recall that a shearing stress yields a relative displacement between the two layers being sheared. When a fluid is between the two layers being sheared, that fluid will experience a relative displacement between its layers, due to adhesion to the surfaces at its outermost layers. Each layer of the fluid will also undergo a relative displacment, due to molecular bonds, and molecular friction. One could imagine a thin film composed of many layers of molecules that experiences a shearing stress. While the top layer moves with the piece of metal being sheared, the bottom layer remains fixed relative to the bottom piece of metal, undergoing no net shearing force. The layers in between will all undergo a succesive shearing force, and consequently a succesive displacement as shown in the following diagram.
The shear stress of this fluid is equal to the ratio F/A, where A is the cross sectional area acted upon by teh shearing force. The shearing froce exerts a strain on each layer of the fluid given by Dx/l. Integrating over all of the layers of the fluid, from 0 to n, we are able to find a relationship between the shearing force and the strain. This relationship is what we know as viscosity, h.
h = Fl/Av
The SI unit of viscosity is Ns/m^2. The cgs unit of viscosity is the poise. The above expression only holds true it the velocity gradient between the layers is uniform, the difference in velocity between layers is linear. If the velocity gradient is not uniform, we must express the viscosity in general terms, where dv/dy is the velocity with respect to the perpendicular displacement..
h = (F/A) / (dv/dy)
In conclusion, the viscosity of a liquid is a fluid's resistance to shearing force.