All it takes is a new lock and a screwdriver, remove the old lock and screw the new one in the exact same spot the old one was before. It is simple but it could be easier to just purchase a new mailbox all together.
If you are referring to a post office box lock, this can only be done by the postal service. The process is not difficult, and involves several screws.