Hayner is the first contender fought in the Struggle mini-game in Kingdom Hearts II. Roxas fights Hayner on the 4th Day in the Struggle tournament, while Sora fights Hayner in his first Struggle battle. Sora must beat him ten times to be able to fight Setzer.
Although Hayner is a very offensive fighter, he isn't very good at counter-attacking or parrying, so he tends to leave himself open after using his own attacks. He doesn't seem to be very coordinated, but his attacks can deal a considerable amount of damage, and he has the most health of all the Struggle combatants in Twilight Town.
When playing as Roxas, begin the battle by locking onto Hayner and backing away. Hayner's attacks consist of a two-hit combo followed by a short thrust. Both attacks leave him wide open for a counterattack. Keep a safe distance and don't stop moving. Wait for Hayner to make the first move. Dodge his attack and attack him before he has a chance to recover. Continue the assault until Hayner is nearly out of orbs, then retreat to collect any that bounce away. To play it safe, make sure that Roxas has more orbs than Hayner, then keep a distance until time runs out.
When playing as Sora, use the Explosion ability to take out most of his orbs. This is the easiest and fastest way to defeat Hayner and acquire all of his orbs.