How Generative AI Actually Works