Replication of data when new peer joins

How does yjs replicates the existing data when new peer joins in?