Here is the simple diagram which explains how the middle man oplog watches/monitors primary and pull any new operation or changes happened on primary and records them in oplog, which eventually get read by all secondaries to update them selves.
- insert operation happened in primary
- Operation got logged in oplog ( which is part of local db – oplog.$main )
- Secondary reads data from oplog and update them selves.