system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does a pet learn its name? How does it know you're calling it?
gpt
It's generally accepted that cats/dogs learn their "names" through types of conditioning. This includes things like Positive reinforcement (cuddles, treats, etc. ). Another example of conditioning comes from Pavlov's experiment.

But, for instance, if you call Fido and Fido responds to the noise and you scratch behind his ears Fido will learn that responding to that sound means getting affection. The same goes with the words treat, walk, etc.

I read somewhere that dogs can supposedly understand from 100- 1000 words depending on the breed.

Hope this helps.