In 1671 Thomas Blood tried to steal the crown jewels. To do this he flattened the crown with a mallet. There are many sources that said he did flatten it but I cannot find anything about the aftermath. How was the crown fixed? There is nothing about a new crown being made so I assume the must have fixed it somehow.
Gold is quite malleable, as shown by Blood's ability to flatten the crown with a few moments' work with a mallet. Reversing the damage would have been done slowly and carefully by a skilled jeweller, but there's nothing fundamentally hard about the job. My practical jewellery experience is limited, but the process would have been something like this:
Make a catalogue of all the semi-precious stones in the crown, and their positions. It's likely that a few would have fallen out during the flattening, and those would have to be searched for. The precious stones were hired for coronations (until 1911), so would not have been present for the theft.
Carefully remove all the stones (they're held in by small metal claws, often on the inside of the crown) and store them safely. Remove all the padding, fur and other trimming, and any removable parts of the gold structure. Arches of a crown are sometimes removable.
Carefully and slowly work the gold structure back into shape. This might be done by pulling with fingers or use of levers for the first stage of the unflattening. Later stages would probably have used a succession of wooden formers, which would gradually approach the shape of a head, and a soft-headed mallet to gradually bend the gold into shape.
This would also be how a crown was re-shaped to fit a new monarch's head. British coronations since the time of Charles II are held at least a few months after the new monarch succeeds, so there's plenty of time for such work.
Once the crown is in the right shape, the stones and any removable parts are re-fitted, and new trimmings are made.
This would have been a few weeks of work for a skilled jeweller and his assistants.