I read this novel about about 10-12 years ago (mid-2000s). I can't recall if was a Young Adult book or aimed at an older audience.
A young man meets an old man who teaches him magic. At some point an evil magician tracks the old man who turns himself to stone to save himself. While this happens the young man signs up to the army.
At some point he is in jail for a night and confides in a friend that he knows some magic and makes a stone give out light so they can see. The first book ends with him killing an evil king(?) who gets magic from an amulet, this is during a battle at the end.
Earlier in the book he gets a blacksmith to forge a sword with a silver hilt and he imbues the silver with magic, as silver is the only material that can hold magic.