A piece of code that is capable of copying itself and typically has a detrimental effect, such as corrupting the system or destroying data.