What does rooting, bootloader, twrp and recovery mean? I have just bought an android phone and I want to get the latest OS. However, I must root and unlock bootloader and recovery.

I understand that to root something you gain administrative privileges. However, I've seen some drawbacks of doing this.

Can one of you explain what all of this does to my phone and point me in the right direction? 

I am new to this, so it would be much appreciated if you guys could help me on this.
Bootloader

The low level implementation of a system which can be used to flash software onto your phone's partitions. Often used to flash root privileges or Stock Roms. 

Recovery

The recovery is another system used to manage/wipe/reformat your partitions. TWRP refers to a custom Recovery which allows you to install custom roms in a zip format. The recovery follows the directions which are contained in the rom zip file.

Rooting

Rooting describes the process of getting administrative privileges on your android phone. You need those priviliges to mount your system partition as read and write so you can modify the files and settings. Most of the time you will have to boot your phone into the bootloader and then flash a root file (like the one from ChainFire) from your computer but there are also apps which can enable the root access by a simple click for certain devices.

If you have further questions to a specific device then you can head to the xda forum for your device and read. It's the most important thing to do before attempting to mess with your phone's software.