Mortar is the paste used to bind blocks of masonry together, forming structures such as walls. It is a mixture of cement, sand, and water. Although mixtures vary, roughly 1 part cement is added to 3 parts sand and then water is added until it becomes a paste.
The paste is applied to the masonry units in question (brick, stone etc. ) as they are laid onto one another. It provides an air tight seal between individual units. The Mortar paste quickly sets and becomes solid thereby locking the structure into one solid object.
Increasingly, traditional Cement-Based Mortar is being replaced by Polymer Cement Mortar - this consists of latexes and other polymers, which are considered to reduce instances of cracking.