What is «generalization» in machine learning?

The ability to categorize correctly new examples that differ from those used for training is known as generalization.

Christopher M. Bishop - Pattern Recognition and Machine Learning (2006)

Generalization refers to your model’s ability to adapt properly to new, previously unseen data, drawn from the same distribution as the one used to create the model.

In machine learning, generalization usually refers to the ability of an algorithm to be effective across a range of inputs and applications.

As an example, say I were to show you an image of dog and ask you to “classify” that image for me; assuming you correctly identified it as a dog, would you still be able to identify it as a dog if I just moved the dog three pixels to the left? What about if I turned it upside? Would you still be able to identify the dog if I replaced it with a dog from a different breed?