Service worker... Someone can explain them to me?

I’m trying to understand what is a service worker, but i don’t understand its functionality.

Someone can help me please?

There you go: https://kosamari.com/notes/Service-Worker-what-are-you

I could, for example, make a service worker who when the app it’s closed at all execute some kind of code with an http.get and see and return the values in a local notification or something?

No idea how and if service workers keep running in the background.

(As mentioned x times before, the correct way to solve this is server side and then send a push notification - I know you can’t do that but other users should know when they read this post.)