How "push notification" works realtime in ionic?

Dear Masters,
Could someone explain to me how “push notification” works realtime in ionic ?
i want to add “push notification” to my app but i still wondering how it works.

There are many tutorials on the internet using “BaaS” to make it “realtime” then how if my backend is not a “BaaS” ?
I mean is that a must ? Implement the realtime “push notification” using “BaaS” like Firebase or etc

Thank you.
Newbie programmer

You can use firebase cloud messaging

Dear xssdp,
Thanks for reply.

I knew that, is there another way to do “push notification” without using firebase cloud messaging?

I was wondering the same. I am developing using mean stack and right now because I want to rely on my my own server. Is it possible to link with my node server in background mode to fetch notifications to logged in user ? Is it battery intensive ?