Matrix is a federating database, kind of? It’s generally less useful to define it by its actual technical spec than by saying it’s the underpinning for “matrix chat”, i.e. this thing which is now being officially called “Element”. If you think of it like “Discord but open source, end-to-end encrypted by default, and self-hostable” you’re not far off.
If you’re curious and want to pay someone instead of spending your own time to admin it, check out Beeper which handles not only running the underlying Matrix instance, but also a bunch of bridges that let you talk to closed-source corporate messengers, e.g. WhatsApp, iMessage, etc. etc.