Learn more about Theomachy
In the Iliad, two theomachies occur. One is fought between Diomedes with the direct aid of Athena against Ares. Ares is wounded by the spear guided by Athena, this is the first theomachy to occur chronologically in the Iliad. The second occurs between Hera and Artemis. This battle is shown by Homer to be almost playful as Hera is smiling while she boxed Artemis' ears, which causes Artemis to fly away in tears.
At one point during the Iliad, Poseidon challenges Apollo to fight. Apollo rejects his offer and comments on the triviality of gods fighting over the whims of mortals while their own pain from injury would be transitory and quickly healed.
Theomachy is purposely added to show the unbridgeable gap between mortal men and the immortals who rule them. By showing the triviality of divine pain, human suffering is highlighted.