This paper introduces the main relevant mechanisms in Artificial Intelligence (AI) and Machine Learning (ML), currently investigated and exploited for 5G and B5G networks. The study explains about the various applications of AI/ML in the telecom industry. A family of neural networks is presented which are, generally speaking, non-linear statistical data modeling and decision-making tools. They are typically used to model complex relationships between input and output parameters of a system or to find patterns in data. Feed-forward neural networks, deep neural networks, recurrent neural networks, and convolutional neural networks belong to this family. Reinforcement learning is concerned about how intelligent agents must take actions in order to maximize a collective reward, e.g., to improve a property of the system. Deep reinforcement learning combines deep neural networks and has the benefit that it can operate on non-structured data. Hybrid solutions are presented such as combined analytical and machine learning modeling as well as expert knowledge aided machine learning. Finally, other specific methods are presented, such as generative adversarial networks (GANs) and unsupervised learning and clustering.