Langevin Dynamics and Diffusion Models: Sampling in Machine Learning and Generative AI