The Science Behind Generative Artificial Intelligence