Rootkits are collections of tools used by hackers to gain administrative privileges on compromised machines and help hide other malware. They allow unauthorized access and control over a computer without the user's knowledge by executing files, monitoring activity, and hiding their presence. Rootkits work by using a dropper to install a loader that loads the rootkit code into memory to covertly operate. There are different types of rootkits that hide in various parts of the computer like the user mode, kernel, firmware, or through virtualization but they are all very difficult to detect.