The “root” account is like the Administrator account you might know from desktop computers/laptops. Basically, a regular user is not just allowed to do everything on the phone, whereas the administrator (“root”) user is.
Now, on phones it is common practice to not provide access to the root account*. People have come to call giving yourself access to this account “rooting”.
It is safe in that it is normal phone functionality that is artificially disabled. It is not safe, however, in the sense that you are allowed to do pretty much everything, and thus could inadvertently break things. Especially since the process of doing it might be intimidating, you are more prone to make mistakes if you do not know what you are doing.
Also, guessing that you want to use this to upgrade your phone: this is not a guaranteed method that allows you to upgrade your phone. As said, I have root access on my phone but cannot update it to a later Android version, as the manufacturer has not prepared the update for my phone.
* Note: this is not the case for all phones. Mine, for example, was fully unlocked.