From a protocol perspective, there is no difference. A really basic way to think of it is this (assuming you start a secondary that is reasonably up to date and is not performing an initial sync):
- Replication is a client connection from a secondary to the primary
- That is done using TCP/IP and with the MongoDB wire protocol being used over the top (unless you are using SSL, which would add that to the mix)
- The secondary creates a tailable cursor and begins streaming the operations from the Oplog
- The secondary applies these idempotent operations to its data in order to reach the same state as the primary
Now, in reality things are more complicated than that but that gives you a good starting point. You still have to add in multi-threaded replication, replication chaining so that you can replicate from another secondary rather than the primary etc. These are advanced topics which I have given multi-hour whiteboard sessions on (when I worked in MongoDB) and beyond the scope of this answer, not to mention the fact that I am likely out of date with my information at this point.
If you would like to go deeper into how replication works, I recommend the internals posts from Kristina Chodorow (though they are a little dated these days) as well as the various talks the MongoDB engineers have given on the topic (here is one example).