This chapter presents the theoretical foundations of machine learning algorithms, and supervised learning according to the concepts of artificial intelligence (AI) as well as unsupervised learning.Also the concept of distance metrics and their importance in machine learning.