They are stuck on with double sided foam tape.
remove it by going behind the badge with something like strong fishing line.
It will leave some of the tape on there which is easiest to clean off with a good soaking of WD40 and a clean cloth.
Once all traces of the glue and foam are gone wipe the area down thoroughly with a solvent like meths to remove the WD40.
If the new badge does not have the tape already on you will need to buy some and apply it - Halfords sell it, called trim repair tape.
When applying the new badge to make sure you do not tough the adhesive ar any time.