Think of instances as “continents” where communities (think of them as “countries”) and users set up their base. For example, you’re now in the lemmy.world instance. That means you are a resident of the lemmy.world instance.
You can “travel” to other instances and participate in the communities they have there too and vice versa.
You can access and comment in Lemmy from kbin, but I’m not sure if you can do the same for Mastodon. But Mastodon users can certainly use their accounts to comment on Lemmy. The beauty of the fediverse (or threadiverse, as some guys like to call it)