A botnet is a collection of computers infected with malware that perform tasks on behalf of someone else, taking instructions on what to do from another computer elsewhere on the internet.
The most common example of a botnet would be a network of computers infected with malware which is instructed to send spam.
A botnet is a number of Internet-connected devices, each of which is running one or more bots. Botnets can be used to perform Distributed Denial-of-Service (DDoS) attacks, steal data, send spam, and allow the attacker to access the device and its connection. The owner can control the botnet using command and control (C&C) software. The word "botnet" is a portmanteau of the words "robot" and "network". The term is usually used with a negative or malicious connotation.