Replication allows data to be copied across multiple servers for redundancy and failover. The replication process involves an oplog which records all data modifications. Slave servers copy the oplog from the master to initially sync their data and then stream ongoing changes from the master's oplog. Replica sets improve on replica pairs by allowing multiple redundant servers where an election process selects a new primary if the existing primary fails.