It basically asks each instance for its “all” feed (or wherever) and passes the combined contents into your chosen sorting algorithm. In 0.10.10 we do a better job of spotting and removing duplicates.
Liftoff!
A mobile client for Lemmy running on iOS and Android
Another weird thing is a community loaded through a different account even though there's an account on the instance the community itself is on:
https://files.catbox.moe/jd3qmc.png
In that case I'd think posts on that instance should always load through the account on it.
I'm not sure how it actually does it but I'd assume it takes the first like 10 posts from all instances then orders them by the sorting method, and then loads more as needed
And when you comment, how do you know which account the comment is coming from?
I think this depends on how the app you're using works.
Edit: oops! I didn't see the community this post was published on.
For liftoffs, if you go to the top of your feed, you can pick instance/account. The feed that you see is for the account only. If the instance that you pick is offline, you just go to the top and pick another instance/account.