I've read that the Fediverse is a bunch of interconnected social media sites. Yet, when I try to log into a new Fediverse site using credentials from another, it doesn't work - I have to make a new account on the new site. For example, I made an account on Lemm.ee and assumed that I could use it to log into hexbear because they are both part of the Fediverse. This was not the case and I will have to make a new account for hexbear. This leads me to wonder though, how are the different Fediverse sites connected? They seem to be completely separate websites.
They are separate websites. They send copies back and forth. On Lemm.ee you're supposed to view Lemm.ee's copy of the Hexbear community on the Lemm.ee instance. Not head over to Hexbear.
Try searching for the Hexbear's Community URL through Lemm.ee and it will ask for a copy if it's not already on Lemm.ee.