The Raft and ZAB agreements divide Multi Paxos into three sub-problems:
Leader Election
Log Replication
Safety
In the process of leader election, roles are also redefined:
Leader
Follower
Candidate
This animated website vividly shows the process of leader election and log copy. I won't talk about it here.
In addition, the official raft website can operate the mock election process by itself.