Recoil, in common everyday language, is considered the backward kick or force produced by a gun when it is fired. In more precise scientific terms, this force is equal to the time derivative of the backward momentum resulting when a gun is fired.
The backward momentum is equal to the mass of the gun times its reverse velocity. This backward momentum is equal, by the law of conservation of momentum, to the forward momentum of the ejecta of the gun (the projectile(s), wad, sabot, propellant gasses, etc.). Provided that enough information is known about the mass and velocity of the ejecta, it is possible to calculate its momentum and thus the recoil. In practice, however, it is often easier simply to measure the recoil force directly, such as with a ballistic pendulum.
In most small arms, the force of the recoil is absorbed usually by the body of the shooter; in heavier guns such as mounted machine guns or cannons, the recoil is absorbed by a mounting system.