Rheology is defined as the science of the deformation and flow of matter and describes mainly the material properties of fluid and semi-solid materials. Rheology is interdisciplinary and is used to describe the properties of a wide variety of materials such as oils, foods, inks, polymers, clays, concrete, asphalt e.t.c. The common factor is that these materials exhibit some sort of flow and, therefore, cannot be treated as solids.
One of the properties often dealt with in rheology is viscosity which measures how thick a fluid is. For example is the viscosity of syrup (molasses in American) higher than the viscosity of water. It can be measured in several ways and I will here show how the viscosity of syrup is measured using a rotational viscometer. The syrup (yellow in the picture) is first poured into a cup. A tapered cylinder, which is called a "bob" is then inserted concentrically into the cup so that it is completely immersed in the syrup.
The transmitted torque increases if the rotational speed increases and the viscosity is calculated by dividing the torque with the rotational speed. The viscosity of syrup is constant whichever rotational speed is used and the syrup is characterized as a "Newtonian" fluid. This is not the case for all fluids. One example of a "non-Newtonian" fluid is cookie dough which becomes less viscous, or less thick, the higher the rotational speed. This can be shown in a flow curve. The opposite behaviour is less common, but can appear e.g. in a starch dispersion.
Some materials are intermediate between solids and fluids and the viscosity is not enough to characterize them. (The cookie dough is actually a good example of this.) A solid material can be described by its elasticity or resilience: when it is deformed it will store the energy and fight back. Imagine a spring that regains its original shape after being deformed. The other extreme is a fluid which stores no energy while deformed and just flows. A viscoelastic material is intermediate and stores some energy and flows a little when deformed.
The setup used for measuring viscosity can also be used for characterizing a viscoelastic material if the continuous rotation of the cup is replaced by a harmonic deformation. If you want to measure the properties of e.g. a viscoelastic gelatin jelly you mix gelatin and water and heat the mixture. Then you pour the solution into the cup, insert the bob and let it set to a gel.
If the cup would be rotated as when you measure viscosity, the gel would break and the measurement would be made on a material with different properties than the gel. The cup is instead moved back and forward in a sinusoidal motion with a maximum deformation small enough not to break the gel.
The movement of the bob depends both on the strength of the gel and on its degree of viscosity. If the gel was completely elastic, the bob would move in phase with the movement of the cup. If it was a fluid, the bob would move out of phase with the cup. A viscoelastic material is intermediate and moves partly out of phase.