Abstract : Template matching is a fundamental problem in image analysis and computer vision. It has been addressed very early by Mathematical Morphology, through the well-known Hit-or-Miss Transform. In this chapter, we review most of the existing works on this morphological template matching operator, from the standard case of binary images to the (not so standard) case of grayscale images and the very recent extensions to color and multivariate data. We also discuss the issues raised by the application of the HMT operator to the context of template matching and provide guidelines to the interested reader. Various use cases in different application domains have been provided to illustrate the potential impact of this operator.