What Is Generative AI and How Is It Trained?