It means getting access to parts of an operating system that you usually don't have access to. This allows you to improve the performance of your phone, increase its battery life, browse protected files, change the boot animation, customize the UI, change certain behaviors, set a battery charging limit, use v4a (an amazing equalizer app), uninstall system apps, and much more
The process of rooting is a little convoluted and depends on the phone, but you should be able to find a guide for your phone if you look for one. Things can go wrong if you don't follow the steps perfectly, but there's always a way out
Your phone will be wiped, so you need to back up your data
Your warranty will get voided in the process, but can often un-void it by unrooting
Your phone will be no less secure, as long as you use a good superuser app (everyone recommends Magisk) and only give root access to apps you trust. Think of it as "run as administrator"