I seem to find most of the stuff I read posted both on Lemmy and Mastodon. What is the connection? What is the difference?

I do understand it’s too different platforms (servers, code bases), but what is the intersection between them?