Nothing, initially.
When a user subscribes to a community on another instance, the user's instance (let's say lemmy.new) asks the community instance (let's say lemmy.world) to send them updates (the instance doesn't get anything for a community where there are no local subscribers).
From this point forward, if lemmy.world is sending out federation activities for that community, it will send the update to lemmy.new as well.
If you're wondering about the years of history on that community, it's not federated to the new instance. The new instance only has the posts grabbed at the point of initial subscription of the first subscriber (a few pages of posts, unsure of the exact criteria), then any going forward. Not the history, which it will probably never have.
I believe you can grab a specific post by taking the URL from the host instance (lemmy.world, in the example) and searching for it on the new instance (lemmy.new), but this would only retrieve that specific post and I believe no comments.
There's no widescale backfilling of previous posts and comments.