I have tried to wrap my head around how this works as a total outsider noob, and I just can not get it! But, I want to. I get the email comparison (different platforms can all speak, so why not have social media be the same?). But, then the white sheets are just all php and python and all this stuff that doesn't make any sense (I know what they are, just not what to do with that info), and for better or worse doesn't…
Gmail and Yahoo and whatnot all speak the same language, "email". They've friended one another ("federated") and have unfriended spam mail servers. They've also settled on roughly the same design for their mail clients, but they didn't need to.
Unlike Gmail, there are a zillion Mastodon servers, because anyone can make it. And unlike email, the "ActivityPub" protocol can be used for a bunch of different uses. Mastodon cuts it up to look like Twitter, Pixelfed cuts it up to look like Instagram, PeerTube cuts it up to look like YouTube, etc.
Basically, Gmail is just one email server, and it speaks SMTP .
Similarly, Mastodon.social is just one Mastodon server, and it speaks ActivityPub.
In practice, I don't think you really need to understand it any further than the email analogy. I just tell those interested to sing up for Mastodon.social and see if they like it.