Conceptually, it's easy.
However, it depends on how it was done the first time around.
If the threads were cut to a good tolerance and you replace it with a brake that also has the threads cut the same, then screw on the new brake with some anti-sieze and work out the timing. Bore, polish, and you're basically done.
Some brakes come pre-bored for a given caliber.
Some people use spaces (washers) on ARs to time the brake to avoid machining. But, you may end up needing a lathe to do a proper job and/or to cut or re-cut a thread releif.
Why are you replacing the brake and was it professionally installed to begin with?
-- richard