Lemmy, kbin, and Mastodon all speak the same underlying protocol -- ActivityPub. I've found that the best way to think of it is to compare it to email. If I send you an email from my gmail account to your outlook account, it just works (well, mostly, email is a bit of a mess lol) even though the two email clients look vastly different from each other. ActivityPub (and federated protocols in general) are like email, but for twitter/reddit.
There are some different message types (it wouldn't make sense to present twitter-like content in the context of a threaded forum like Reddit), and not all instance types support all the different message types. I'm using kbin (via kbin.social) and I can see Mastodon content, but I'm not sure if Lemmy has that ability.
Not sure if that was helpful, and I hope that others come and fact check me, but that's my understanding of it.