I am talking about the services which let you monitor the status of a website whether the website is up and operational or down or under heavy load.

how do they work under the hood?

for example:

https://githubstatus.com

https://instatus.com

I am building something similar for monitoring my web projects.