The ARP protocol is used to change the addressing protocol on the upper layer (IP Address) into a physical network address.
The ARP specification can be found in RFC 826.
Figure 5.2 How the ARP protocol works
How the ARP protocol works:
Host Y broadcasts by sending an ARP Request message. If the target host is on the same network, the host will send an ARP Reply message containing MAC information.
If the target host is on a different network, the router that separates the networks will send the ARP Reply.
Reverse Address Resolution Protocol (RARP)
The RARP protocol is used to convert the lower layer device protocol (MAC Address) into an IP address.