A botnet is a network of internet-connected devices infected with malicious software, allowing others to remotely control these devices. Botnets can be used to overwhelm websites or services with traffic as part of a DDoS attack, steal information from infected machines, and send spam emails. The attacker's commands are undetectable to the user but give the attacker access and control over devices on the botnet.