Over the past decade, distance metric learning has been developed as one of the basic techniques in machine learning and successfully applied to a wide range of image and video understanding tasks showing state-of-the-art performance. In this tutorial, we will overview the trend of distance metric learning techniques and discuss how they are employed to boost the performance of various image and video understanding tasks. First, we briefly introduce the basic concept of distance metric learning, and show the key advantages and disadvantages of existing distance metric learning methods in different image and video understanding tasks. Second, we introduce some of our newly proposed distance metric learning methods from two aspects: sample-based metric learning and set-based metric learning, which are developed for different application-specific image and video understanding tasks, respectively. Lastly, we will discuss some open problems in distance metric learning to show how to further develop more advanced metric learning algorithms for image and video understanding in the future.