These are steps for Rooting a mobile:
1.Unlocking the Bootloader.
2.Rooting the Device.
Unlocking the Bootloader
A bootloader is usually locked on an Android device because although it’s an open source OS, still the manufacturers want you to stick to their Android OS version specifically designed for the device. In order to apply this concept, manufacturers lock the bootloader.
Rooting the Device
Want your mobile unrooted back to stock.