In theory, Lemmy and Mastodon are compatible with one another, as they both use ActivityPub.
In practice:
Mastodon users can only see Lemmy posts as Boosts ("retweets"), and from what I hear, it's fairly annoying and not a good experience
Lemmy users can't see anything on Mastodon at all, Lemmy doesn't have a way to federate with Mastodon instances yet.
This is the first time Lemmy has seen this many users ever, so I'm confident both of these issues will be fixed sooner or later. When they are, you'll be able to see Lemmy posts on Mastodon as if they were posts ("tweets"), and you'll be able to see Mastodon posts on Lemmy as some kind of post (not sure if the format has been decided yet).