I used to be a locksmith. If you have the right tools, it’s quite simple. But if you fuck it up-- well, you don’t want to fuck it up. There are lots of tiny parts under spring tension and they WILL go flying everywhere (trust me).
If you get a rekeying set at Home Depot or wherever like this, just READ THE INSTRUCTIONS CAREFULLY and follow them exactly.
The crucial step, the one you don’t want to fuck up, is once you get the cylinder separated from the lock, is sliding the follower (the hollow tube) behind the plug into the housing. The housing contains the top pins, under spring tension. The purpose of the follower is to keep everything in place while you’re replacing the bottom pins in the plug.
And make sure the plug turns smoothly in the housing before you put it all completely back together. To check, put the key in and look at top of the plug (the “holes”); the pins should come right up to the top of the holes. They can be slightly over or under and it should still be okay, but any more than maybe 1/2 mm and you did something wrong, and you should start over.
It’s pretty cool to take apart a lock and see how it really works. Diagrams don’t really do it justice. It’s such a simple thing and yet a total mystery to most people. Rekeying was one of my favorite things about locksmithing.