Rootkits can infect your computer in a lot of ways. For example, they can travel through email attachments or hide in suspicious websites. Also, you might get one with infected software.