Mortar and grout are used in both masonry work and tile work; however they serve different purposes. Both products are Portland cement based product, which causes them to harden. The variables are in the size of the aggregates (stone, sand, etc) and the quantity of water added to the mix.
Mortar
The role of mortar is to make one material stick to another. For instance, a mason laying bricks or concrete masonry units (CMU) will place mortar in the joints between the bricks or blocks. Similarly, a person installing tile will lay a mortar bed so the tiles stick to the floor or wall.
Grout
Grout is a filler product and is intended to flow. Therefore, it usually has a higher water content. A mason will fill the cores of a CMU with grout. A person installing tile will use a grout to fill the spaces between the tile after the mortar has cured.
Variations
Both mortar and grout come in many variations and it is important to select the correct product for the intended purpose. Consult with a professional or manufacturer for recommendations on which product is best.