Fediverse uses ActivityPub protocol, you have to implement the protocol to be part of the Fediverse. Anything that implements it can join.
There's a special endpoint that all Fediverse instances have to implement and if that endpoint exists and is valid, the instance is part of the Fediverse. Note that if you implement only the single endpoint, it's pretty useless, because no interaction occurs, so you need to implement more parts to actually be a meaningful part of the Fediverse.
As an example, I'm currently writing a blog system for my blog which will implement ActivityPub, so the posts will be directly available in Lemmy. And all the Lemmy comments will appear on my blog.
Edit:. If you're interested more specifically in the special endpoint, it's /.well-known/nodeinfo, every Fediverse instance (no matter the software) will have one, for example your Lemmy instance: https://lemmyusa.com/.well-known/nodeinfo or mine: https://lemmings.world/.well-known/nodeinfo or the Mastodon server I'm on: https://phpc.social/.well-known/nodeinfo