A few things happen that lead Percy to finding and returning the stolen lightning bolt. When Percy leaves Half-Blood Hill, the training camp for heroes, his quest is to find and return Zeus's master bolt. Setting out on the quest is important, but Percy does not end up finding the bolt immediately. Everyone thinks that Hades has stolen the master bolt, so Percy journeys to the land of the dead. Along the way, Percy meets Ares, who gives him a backpack. When Percy finally reaches the Underworld and meets Hades, it is revealed that the bolt was hidden inside the backpack all along. Percy manages to escape the Underworld, battle Ares, and then return the master bolt to Zeus.
Mainly, Percy's mother was trapped in the underworld, the lightning bolt was all along with him.