The Magic Hammer is said by Ralph to have been given to Felix by his father, Fix-It Felix Sr. The hammer has the power to repair anything it touches. Not only that, the hammer is also shown to heal physical injuries, as Felix is able to heal the bruises on his face when he is punched by Sergeant Calhoun.
Unfortunately for him, this can be used against him: anything the hammer touches is instantly restored to pristine condition, and it cannot be used to destroy or damage things, as Felix uses it to try to break the window bars of his prison cell, but strengthens them instead.
Role in the First Film
In the film, the hammer is used several times. When Ralph game-jumps into Hero's Duty to win a medal, his game Fix-It Felix, Jr. is put out of order and is scheduled to be unplugged in the morning, resulting in the characters of the game being homeless. Felix journeys off to find Ralph, teaming up with Sergeant Calhoun to do so as a Cy-Bug has unintentionally gone with Ralph to a game called Sugar Rush. In Sugar Rush, Felix and Calhoun fall into Nesquik Sand and begin to sink rapidly. Felix begins to panic, but then Calhoun punches him to snap him out of it, causing the Laffy Taffy vines above them to laugh and lower as they do so. To keep them laughing, Calhoun punches Felix, leaving painful bruises. Felix uses the hammer to heal himself and the two are eventually saved. To find Ralph quicker, Felix uses the hammer to repair a shuttle that Ralph has crash-landed. When Felix is sent to the "Fungeon", he attempts to use his hammer to break the bars, but it instead causes the bars to become firm and stronger.
Later on, Ralph befriends a glitch named Vanellope who must cross the game's finish line in an official race to become an actual character. When Ralph comes to Felix's rescue and begs Felix to fix Vanellope's kart that Ralph has destroyed earlier (on King Candy's commands to keep Vanellope safe from oblivion), Felix repairs the kart so that Vanellope can participate in the Random Roster Race. The finish line is destroyed when the Cy-Bugs (who have multiplied in numbers) ravage through Sugar Rush, but is repaired by Felix after the bugs are defeated, allowing Vanellope to cross, which resets the game. After returning to Niceland, Felix uses it to construct a village for the forgotten video game characters and continues to use it in his game as it is his duty to fix the damage done by Ralph.