AppendEntries RPCs with no entries are known as heartbeats, which the leader sends periodically to the followers to tell them that he's alive. The followers each have a different timer that resets everytime the they receive an heartbeat. If this timer reaches zero, it means that the leader may have crashed and the follower whose timer reached zero switches to the Candidate state to try to be the new Leader.
The leader sends AppendEntries RPC's with logs when the leader receives any requests from the clients and stores them in its own log. It then sends the new entries to its followers using AppendEntries.
Here you can visualize raft in action, they all start in a follower state and since there is no leader to send heartbeats, one of them switches to candidate state and becomes the Leader.
There could be another dedicated RPC to be the heartbeat but Raft uses AppendEntries because it does the job. The heartbeat is also used to update tell the followers who the current leader is and which term they are on.