The tutorial is not too difficult if you’re accustomed to this kind of thing, but if you’re a bit of a noobie, make sure you read every detail to prevent any mishaps. Before you get started, you’ll need to run the edition of fastboot specific to your computer’s OS. If you’ve done this before, you’ll be more than aware on how to install the fastboot driver. You will also need the cable that came with your Nexus 4, and the ability to enter commands into your Terminal / Command Line.
Step 1: Power down your Nexus 4 before rebooting into fastboot mode. You can do this by holding down the the Volume Down and Power buttons simultaneously.
Step 2: Connect your device to your computer. Open up a terminal or command prompt, and navigate to the folder containing the fastboot program.
Step 3: Type fastboot devices into the command line, and you should then see your device’s ID, which means fastboot is setup correctly.
Step 4: Once fastboot is set up properly, type fastboot oem unlock into the command line, and follow the prompts on your device’s display. As already mentioned, your device’s data will be lost once you press "Yes," so make sure you’re backed up.
After that, your device will reboot, and you’ll have a great deal more freedom than you ever could have had with a locked bootloader.