All fediverse software (lemmy, kin, mastodon, etc) implements their own version of ActivityPub in slightly different ways. There are cases where the overlap is enough to cross over (lemmy communities and kbin magazines), and some where it doesn't work/is wonky (lemmy users can't follow mastodon users).
There's a more in depth write up here if you're curious: https://overengineer.dev/blog/2019/01/13/activitypub-final-thoughts-one-year-later.html