MongoDB uses replication to provide high availability and scalability. The primary node accepts all write operations and logs the changes to the oplog (operation log), which secondary nodes replicate from to stay in sync. The oplog contains entries for all insert, update, and delete operations with metadata like the timestamp and operation. It acts like a rolling queue to support replication as older entries are overwritten. Replication allows increased read capacity and redundancy for disaster recovery.