I understand that when a host receives an arp request packet, and the IP address to be resolved is not for this host, then the arp request packet will be discarded. The arp cache will not be updated since a host will update its ARP cache, only if the ARP request is for its IP address.
I have read that gratuitous arp request is used for updating the old arp mapping in hosts / switches. Since the IP address to be resolved in the gratuitous arp request packet is the IP address of the sender itself, why would the receiving hosts update their arp cache since the arp request is not for their IP addresses?
The link provided by Arun is helpful. I would take a different approach about one aspect of what it discusses. It discusses what it lists as Gratuitous Reguest in which a host sends an ARP request for its own IP address. I would argue that is is not gratuitous. In my understanding gratuitous implies that it is unsolicited. Sending an ARP request for your own address is not unsolicited and is a common behavior to detect IP address duplication.
Other than that point I find the article to he helpful.
I would offer one clarification which might be helpful: your question is phrased in terms of ARP requests and how hosts discard requests which are not for their own address. And this is true. But a Gratuitous ARP (as most of us understand the term) is an ARP response not a request. When a host sends a Gratuitous ARP it is sending an ARP response which announces its IP address and its MAC. Most hosts listen to ARP responses and process them.