A Rootkit is similar to a software, only thing is that it when it is installed it logs the details on your computer. That is, it might open access to your protected files and folders , allow access to other resources and even allow a person to trace the activities in your computers like your internet history etc.
Rootkits may be purposefully installed, say in a company to monitor the internet access or may be maliciously installed in your computer by hackers and malicious software to steal data from your system.
Rootkits especially the harmful ones can be installed in various ways, it can be like a software, disguised to perform some other function, or through email or through even pictures and videos. Even popup from malicious websites can install Rootkits.
To make sure that you do not get any Rootkits installed, make sure that your antivirus is updated regularly and there are also special Rootkit detecting tools for analyzing Rootkits.