This post is a bit broad. But I'll try to explain it in the simplest way I can. But I strongly suggest that you just watch the Getting Started with Firebase Cloud Messaging on Android - Firecasts vid.
You can send FCM Notifications by sending HTTP Post Requests (through your App Server) to the FCM endpoints that contains the Message Payload -- data that you want to send. This post might be useful for you.
This payload is then sent from the FCM Server towards the specified (Android) client app(s) that are configured and have implemented the client-side handling of messages from FCM. See the Setting up an FCM Android Client app for more details.
Upon registration, each client (i.e. app instance) will generate a Registration Token that you use in your payload, to specify which user(s) are going to receive the push notification.
On a simpler note:
- App Server sends payload.
- FCM Server receives and processes the payload, determines if the App Client is available, then sends the payload.
- Client App receives and handles payload.