How does WordPress know when there are plugin updates?

How does a WordPress plugin know whether if there are updates available to download and to download those updates. What function or script controls this and how does it work?

I am assuming this would be the same function that controls whether a plugin has been purchased aka premium or has not been purchased and how do product keys work?

I want to find out because I want to dive into creating my own plugin.

Topic plugin-repository plugins Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.