Goofy
Goofy is Captain of the King Mickey's army. He and Disney Castle's court magician Donald went out to search for the King, and ends up teaming with Sora for the rest of their journey.
Story
Journey
Goofy's role began when Donald rushes to tell him about the King's absence, but the secret is quickly discovered by Queen Minnie and Daisy.
King Mickey's letter explains that darkness is threatening the worlds, which appear as stars in the night sky, and have been blinking out one by one. Therefore, he left in order to study and counter the threat, and provides Donald and Goofy with the mission to seek out the "key to their survival". To start, they should head to a world called Traverse Town, and find a man named Leon.
Donald and Goofy, loyal to their king and concerned about his welfare as well as the worlds', agree to take on the mission. Queen Minnie also introduces them to another traveling companion, Jiminy Cricket, who will chronicle their travels in his journal.
With the three of them as well as Pluto, they take the Gummi Ship and begin their journey.
Meeting Sora
Donald and Goofy soon arrive in Traverse Town, having gained new, more casual, clothes. They set out in search of Leon and the key, but end up meeting Aerith, a friend of Leon. She explains to them the situation with the Heartless, the Keyblade, and the Ansem Reports, a document written by "Ansem" that details his findings on the Heartless. They also believe that the King might be searching for them.
However, things take a turn when Heartless attack the hotel that Donald and the others are in (with Leon, Yuffie and Sora, the Keyblade wielder they have been searching for, in the next room). After some confusion, Donald and Goofy arrive in the Third District, where they end up crashing into Sora. But many Heartless and the Guard Armor attacks, leaving the three to fight them off.
After the battle, the three introduce themselves. Donald and Goofy explain that they have been searching for Sora, and that if he travels with them, they can go search for the King as well as Sora's friends Riku and Kairi. Sora agrees, and the three set off.
Journey
Sora, Donald, and Goofy set off to many worlds, defeating Heartless, the Disney villains, and sealing keyholes that lead towards the hearts to worlds, as well as making many new friends. The groups friendship was put to the test when they traveled to Hollow Bastion, where their first adventure was comming to a close.
Hollow Bastion
At Hollow Bastion, the world that Leon and his friends hail from, and which Maleficent has turned into her base. To everyone's surprise, they encounter Riku (having not seen them since a second visit to Traverse Town), having just wounded an other-world resident named Beast. When they go to Beast's aid, Riku reveals himself to be the Keyblade master, and the Keyblade leaves Sora and enters Riku's hand.
Having been explicitly ordered to follow the Key, Donald and Goofy have no choice but to leave Sora and follow Riku. But eventually, with the aid of Beast, Sora catches up with Riku. With the Beast lured away by a Heartless feigning to be his beloved Belle, Riku attempts to eliminate Sora once and for all with a dark blast. However, Goofy comes to the rescue and blocks the attack, his friendship with Sora too powerful to ignore and they would betray the Kings orders to protect their friend. With the strength of their friendship strengthening Sora's heart, he regains the Keyblade, meaning that Donald and Goofy are no longer going against orders.
The trio then make their way through Hollow Bastion, confronting Maleficent as well as Riku, who is now possessed by Xehanort's Heartless and wields a Keyblade forged from the hearts of six of the seven Princesses of Heart. Unfortunately, Donald and Goofy are separated from Sora for the duration of the battle between Riku and Sora.
They also come across Kairi's body, devoid of her heart. When Sora discovers that Kairi's heart rests within his own, he chooses to release it by stabbing himself with the dark Keyblade left behind by Riku. Though Kairi is revived, Sora loses his heart to the darkness and becomes a Heartless.
Xehanort's Heartless makes his reappearance (and now in nearly total control of Riku's body) soon afterwards. Though Donald and Goofy are no match for Xehanort's great power, Riku is able to appear, holding back Xehanort temporarily. Donald and Goofy then attempt to escape with Kairi.
At the foyer of the castle, Heartless block their path. However, another Heartless, seemingly without hostile intentions, arrives. Kairi realizes it is Sora, and is able to revive him, much to Donald and Goofy's relief. The four then make their escape.
Kingdom Hearts
The trio then make their way back to Hollow Bastion, fighting their way through Heartless and sealing up the Keyhole opened up by the seven princesses. They then journey to the End of the World. There, they confront Xehanort's Heartless at the remains of Destiny Islands, and then at the endless abyss, where the Door to Darkness that leads to Kingdom Hearts itself resides. After Xehanort's defeat, Sora, Donald, and Goofy attempt to seal the door, but their efforts are futile.
But then, the King makes his appearance, wielding the Keyblade of the Realm of Darkness. With the two Keyblades and the assistance of Riku, the Door to Darkness is sealed, and the worlds are restored. However, the King and Riku are sealed in the Realm of Darkness, though the King tells them that there will always be a door to the light. After sealing Kingdom Hearts the group is sent to a field where they discuss what to do next. When they are left without answers, Pluto, prompting Goofy to ask where the dog has been since the beginning of their mission, with a note from the king leads them straight towards Castle Oblivion.
Kingdom Hearts: Chain of Memories
Castle Oblivion
Sora, having encountered a mysterious figure, goes with Donald and Goofy to Castle Oblivion. Inside, they discuss going further into the castle, realizing that all four of them, including Jiminy, feel that Riku and the King are in the castle. But before they can progress, they meet the mysterious man once more. Donald, assuming the man to be a Heartless, attacks, but finds out that none of his spells will function. The man reveals that Sora and his friends forgot every single ability they knew as soon as they entered the castle. In addition, the figure remarks that in this castle, they will find someone they know. Granting Sora a card, the figure leaves, and the others are compelled to follow.
Sora, using the card, goes deeper into the castle, only to find that he is in Traverse Town. In addition, Donald and Goofy have disappeared, being at the mercy of the cards that control Castle Oblivion. After learning to battle, Sora reunites with Donald and Goofy, who have also gained new clothes. The three continue on, meeting memory versions of the people they have encountered in Kingdom Hearts.
Unfortunately, as they progress through the castle, they find that their memories are slowly fading. It isn't until later the group realises that their memories are being manipulated by Naminé, and they begin to encounter members of Organization XIII, including Axel, Larxene, and Vexen. All leave cryptic remarks about the nature of Castle Oblivion, including memories, and even about the other half of Sora's heart.
But they also meet Riku, who apparently is also striving to reach Naminé, but has once again turned on Sora. Donald and Goofy reason that Riku just forgot that Sora and he are friends, but Sora still slowly succumbs to anger at all the things that have been happening to him.
The three, after Vexen had been eliminated by Axel, become separated once Sora's anger at the Organization's manipulations overcomes him. When Sora is caught off by Riku, who in turn is knocked unconscious by Naminé shattering Riku's memories apart, Larxene comes in for the kill. But Goofy and Donald come in the nick of time, saving Sora and defeating Larxene. It is then that they learn of Naminé's true nature, as well as the fact that the Riku before them is only a replica of the real person. Naminé tells them that she can restore their memories, but only after they defeat Marluxia, the lord of Castle Oblivion. The three then travel to the 13th floor of Castle Oblivion. By this point, however, Donald and Goofy have forgotten about King Mickey, only recalling that they are looking for someone important.
As they make their way to Marluxia, the three also make an important promise: that no matter how far apart they are from each other, or if they have forgotten each other, they will always be friends. Using that promise as strength, they go on.
The trio then confronts Axel and Marluxia, with Marluxia using Naminé as a human shield. Marluxia escapes, but the three manage to defeat Axel, and soon after defeat Marluxia (after a round against a replica, and then the real thing). Naminé then leads them to stasis pods, where they can sleep while Naminé fixes their memories. Donald and Goofy say goodnight, and leave, while Sora and Naminé say goodbye.
Kingdom Hearts II
After the events of Castle Oblivion, Goofy and Donald wake up first and wakes Sora up from his year long sleep. From their they meet the King once more who tells them to go find Yen Sid, and their adventure starts again.
Battle of Hollow Bastion.
In the second game, Goofy's most notable scene is during the Heartless invasion of Hollow Bastion, right after defeating Demyx of Organization XIII. After the battle, as the trio meet up with King Mickey, a battle between a Satellite Robot Heartless and presumably a Nobody creates an explosion sending a large rock in the group's direction. Mickey would have been hit had Goofy not pushed him out of the way but in doing so, he is hit hard on the head instead, leading Sora, Donald, Mickey and the player to believe that Goofy is dead. However, not long after, it is revealed that he was only out cold for a bit as he meets up with the three of them shortly before the 1000 Heartless battle. This scene, despite its true intent to be a reference to Goofy's many wallops on the head and other mishaps over the years, by far, is the most mature scene in the series with the concept of death (to a well-loved character, no less), albeit supposed, and is one of the many hints of the more mature feel of the Organization XIII storyline (Chain of Memories and Kingdom Hearts II) than the first game.
Goofy, along with Donald Duck and a virtual Sora, will be reappearing in Kingdom Hearts coded.
Fighting Style
Goofy uses shields, both offensively and defensively.