Deep Learnng with pytorch

Hello, I am a student enrolled in the Zero to Gans course, just had a question if you could help.
I really dont understand the concept of “the model learns”. I always thought that it will evaluate everytime.
The model training includes setting the right weights, adjusting the weights or kernels till we get our predictions right.
But when you say that from the training datasets it learns that a specific dataset is a dog or a specific dataset is a cat. It makes less sense. The model does not store this! So how does it learn this bit.