How does artificial intelligence learn to do new things?

Here's a strange little secret about artificial intelligence: nobody really teaches it the way a teacher teaches a class. No one writes down "this is a cat" rule by rule. Instead, AI learns the way you learned to recognize your grandma's face — by seeing tons of examples and slowly noticing the pattern. Let's peek inside that messy, marvelous process.
Imagine you want to teach a machine to tell cats from dogs. You don't explain whiskers or tails. You just show it thousands of pictures, each one already labeled "cat" or "dog." This pile of examples is called the training data. It's the AI's whole world — everything it's about to learn, it learns from this stack.
