Lots of Android users are still don't know the difference between rooting & unlocking bootloader and they will get confused between these terminology. There is a major difference between these two & also they are related to each other. The difference & relation is as follows:-
Rooting - Rooting a device is a method to gain full access to the device operating system (Android). However, rooting only affects your operating system. With root you are able to perform all the administrative stuff, such as access to write files to the system partition or delete all the files or uninstall system apps. Root enhances your privileges and you are able to change almost anything inside of your ROM.
Unlocking Bootloader - Bootloader is the instance that calls the operating system (Android) and manages direct access to the device's partitions. Having an unlocked bootloader enables you to flash custom roms, custom kernels, recoveries and so on.
Relation between Rooting & Unlock Bootloader - A locked bootloader also locks write access to several partitions like the system partition. This is the reason why rooting is not able without unlocked bootloader. Rooting needs write access to the system partition (for storing the superuser binary and the superuser app) Without unlocked bootloader, only a temporary half-root can be achieved.