Stop Asking "Anything New?" Let Them Tell You.
Imagine calling a shop every 5 minutes to ask if your order is ready. That is polling. Now imagine the shop says "leave your number, we will call you". That is a webhook.
Polling: you keep asking
Your code calls the API on a timer: anything new? It is easy to build and needs no public URL. But it is slow, and most calls come back empty. Each one still counts against your rate limit. GitHub allows 60 calls per hour without a login, so polling every minute uses the whole budget.
Webhooks: they tell you
You give the other system a URL on your server. When something happens, it sends a request there. It is fast and saves calls. But you need a public URL that is always up and replies quickly. GitHub, for example, asks for a reply within 10 seconds.
Webhooks can get lost, so use both
The sender may be down, or your server may be down when the webhook comes. Then it may never arrive, and no error shows on your side. So most solid integrations use webhooks for speed and a slow polling job, once an hour or once a night, to catch what was missed.