With a big hammer.
Seriously though, one time I had to do what you're asking since the quality of the metal on the original bolts was quite poor, causing the inside of the bolts to wear off rather quickly (after only some string changes) and become round.
I did it with a pair of pressure tweezers (locking pliers), but being careful to apply only a very small turn each time, as not to dent the guitar's body with it while turning them.