A worm is a type of a virus which is self-replicating, but it is not harmful to the system or applications files. The function of a worm is to consume as much memory as possible by self-replicating. This means if the size of a worm is 2Kb, it will then multiply itself by a defined number of times, and then the new worms will also replicate them-self and so on. So, although it started with 2kb, it will self-replicate and create thousands of copies of the same file, and therefor, it will consume a lot of system memory.
Worms are normally not noticed until it starts to consume a lot of system resources, slowing down the system.
This kind of virus in not used very often these days, since the system memory is very large and cannot be filled with worms rapidly.