Okay I'll tell you what exactly happened.
Bear in mind that these are each Pokémon's move set:
Arceus: Judgment, Flamethrower, Twister, Blizzard
Dialga: Roar of Time, Draco Meteor, Hyper Beam, Protect
Palkia: Spacial Rend, Aura Sphere, Hyper Beam, Protect
Giratina: Shadow Force, Will-O-Wisp, Dragon Claw, Aura Sphere
The first attack on Arceus was by Palkia. It used Aura Sphere which is a Fighting type move, so to negate the attack Arceus changed it's type to Ghost as Fighting type moves doesn't effect Ghost.
The second attack on Arceus was by Dialga. It used Hyper Beam on Arceus, so Arceus once again changed it's type to Ghost as Ghost types are immune to Normal type moves.
The third attack on Arceus was by Pikachu. Pikachu's attack actually worked as Arceus did not have it's Earth and Zap Plates to negate the attack, since they were both used to construct the Jewel of Life. Source
The fourth attack on Arceus was by Giratina. Giratina used Will-O-Wisp so to negate this, Arceus changed it's type to Fire since Will-O-Wisp does not effect Fire types.
The fifth attack on Arceus was again by Giratina. This time Giratina used Aura Sphere, so to negate the attack Arceus changed it's type to Ghost as Ghost types are immune to Fighting type moves.
The sixth and final attack on Arceus was again by Giratina with it's never say die attitute. It used Shadow Force to which Arceus successful dodged the attack.
Source: Skipped through the movie to remind myself of what exactly happened.
Hope I helped :)