Please explain how does a GARP works!
Generic Attribute Registration Protocol (GARP) was an open protocol used to share VLAN information among switches. It has since been replaced with Multiple Registration Protocol (MRP). Cisco uses Virtual Trunking Protocol (VTP) for such purposes. You can find out more about VTP here:
Now if by GARP you meant Gratuitous ARP, then that is a different story. A gratuitous ARP is an ARP request or reply that occurs when it is not normally needed. In other words, a gratuitous ARP request can take place just to update an ARP table even if a frame does not need to be sent. A gratuitous ARP reply can be sent to allow others on the network to update their ARP tables even if the host sending it out was not explicitly requested to do so.
Gratuitous ARP is useful because it can help detect IP conflicts faster, it assists in updating other devices’ ARP tables allowing for faster redundancy fail-over in things like HSRP or server clustering, and it informs switches of MAC addresses that may have expired eliminating flooding of frames.
I hope this has been helpful!