A big challenge of 5G networks is trying to manage the numerous heterogenous connections under strict response constraints defined by the applications. In order to exploit the flexibility and programmability of 5G networks, there is a need to develop automated procedures to provide and manage network services and applications that are changeable. Machine Learning (ML) is a promising solution that can meet these new demands that are beyond the limitations of traditional optimization techniques. This PhD thesis aims to make a critical evaluation of ML approaches that can be implemented in 5G/B5G Core networks and design novel mechanisms in order to support the stringent performance requirements of vertical applications (i.e., Industry 4.0, autonomous vehicles).