Hercules is a boss who can be fought in the Hercules Cup of Olympus Coliseum in Kingdom Hearts. For this battle, Sora asks Hercules to fight him one-on-one, in a friendly competition. He is also fought in the Titan Cup and Titan Paradox Cup in Kingdom Hearts II.
When Hercules is glowing yellow, he's invincible. Wait until he stops moving, then pick up a barrel and toss it at him. The barrel removes the yellow glow, making him vulnerable. It isn't necessary to wait for him to stop, but it is more likely to hit him when he does. Make sure to throw the barrel at close-range so that Sora can unleash a combo of attacks on him directly afterwards. Alternately another good method to deal damage to Hercules is to cast Stop magic, followed up by a special attack such as Ars Arcanum or Strike Raid. Use Dodge Roll to evade his punches, and jump to safety when he punches the ground to regain his glow.
When Hercules is back on his feet, watch out for his counterattacks. Note that almost all the time, when he is made vulnerable by a barrel, he counters with a punch. Evade it, and then hit him. Occasionally, when Sora throws a barrel at him, he will be stunned. Take advantage and land a few blows on him. Use Glide to float around and dodge his charging attack, or use Guard to stop him and leave him vulnerable. Periodically, Hercules will do a spinning tornado attack, which destroys all barrels on the field, which will reappear seconds later. After Hercules finishes his attack, he'll get dizzy and if he isn't glowing, vulnerable to attacks.
If he isn't glowing when he uses these attacks, Sora can stop him by counterattacking, however, it would probably be wiser to wait for him to stop moving, and then repeat the strategy all over again. After defeating Hercules once during the Hercules Cup, Sora will gain 100 EXP from then on for defeating him.
Kingdom Hearts II
Hercules uses almost the same moves from Kingdom Hearts (except for the spinning tornado attack), and this time there is no yellow glow around his body, making him open to attacks. The only time a yellow glow is seen is when he is about to charge up for a powerful punch.
Evade the attacks he makes—use Dodge Roll and Glide as best as possible, and do not be shy about using physical attacks. Reflect magic works very well for almost every attack he does. It is also possible to block an attack with Guard, then use Counterguard (if available).
Hercules is unarguably a much easier opponent than in Kingdom Hearts, and constant attacking should enable an quick victory.
Notes and references