In the country where the Franks lived, there was the King and the Mayor of the Palace, since the kings were becoming quite lazy so they didn't really do anything, the "Mayor of the Palace" made war, led armies, raised money, and carried out money decision. So the "Mayor of the Palace" was basically the king.
Pepin, Charles father was the Mayor of the Palace before him, until Pepin died in 714, his wife tried to take over, even tried imprisoning Pepin's son, Charles. Well, Charles wasn't consisted as the next mayor, because Charles was his legitimate son.
Charles escaped prison and began organizing support from nobles. Charles was even appointed as the army's leader, which was supposed to be the Mayor's job. He was appointed when an outside band of Franks attacked.
This very first battle he fought was the only battle he lost in his whole army career.
The next battle was the Battle of Amblive, he used 3 tactics which will become his trademarks:
Then he had the title of Mayor for the rest of his life.
He conquered Autrasia, the loyalty of the Catholic, Bavaria, Almania, the Saxons, and South Germany to his kingdom.
One of the wars was the Battle of Tours, it seemed that the Muslims outnumbered him, but his good tactics and stuff actually sent the Muslims back into Iberia. It was this hammering that gave him the nickname Charles Martel or Charles the Hammer.