What is Rootkits and how it works?

My friend told me that rootkits are very dangerous. I have no idea what is that or how does it work. Is it some kind of a virus or just a software that needs to be installed. He can not even explain it to me in a way that an average person would understand.
I've done research on the internet but I still don't get what that means. All I get are information like attacking computers.
If someone tech savvy knows about it, please shed some light if this is a software to be avoided or not. Thanks a lot.
