I didn't see federation mentioned anywhere, just self hosting. The difference:
- Self hosted means everyone has their own server, people need to register for the server they're interested in using. Websites are an example of this: you host your own system independently of anything else going on (though there are hyperlinks to cross-link content, which aren't necessarily present in other self-hosted software). Git servers are another example, like Gitea or Forgejo or Gitlab or gitweb
- Federated usually lets you connect servers, so that if I'm on HN and want to post a comment on a Reddit thread, if they were federating, I could just do that without logging into reddit specifically (let alone registering a completely separate account for the other server). The best example may be email, where I don't need to register with Google (yet) to send a Google user an email but I specify @gmail.com after the user's name. A more recent popular example is Mastodon
Each has upsides and downsides, like having to moderate content from other servers and having a much more complex protocol (federated) versus being independent and simple but also being another walled garden (self hosted)