Depending on what kind of tuner you’re replacing, a locking tuner is usually pretty easy to install. There are two main types of guitar tuners, vintage and modern. They are defined by the diameter of the peg hole on the headstock, which is usually 8mm on a vintage tuner and 10mm on a modern one.
As there are two different types of tuner, you need to be careful about replacing a vintage tuner with a modern tuner and vice versa. It can be done, but you’ll either need to widen the hole using a reamer or buy a set of conversion bushings to get the right fit.
There is something else to take into account as well, which is the way the tuner is mounted. Some guitars, like Fender, use a guide pin style system, where a bushing creates pull to clamp the tuner to the back of the headstock. Others, like Gibson guitars, use a mounting screw to attach the tuner to the back of the headstock.
Whichever kind of guitar you have, it’s definitely worth doing some research on compatibility to make your upgrade as pain-free as possible. There are loads of videos and information on forums online to help you with the installation process if you’re unsure.