AI Explained: The Ins and Outs of Foundation Models