Computer Virus
Essentially a Computer Virus can be defined as a program or coding that is uploaded onto a computer without any concent from its owner. A Computer Virus function according to how they are program by their creator.

Trojan
A Trojan horse is a virus that masquerades as a safety program. It claims to delete viruses but instead can make the computer vulnerble and prone to new viruses. Most Trojans are destructive and just like viruses function according to how they are programed.

Worm
A worm can be a program or an algorithm ( A step of rules and instructions that lead to a function ). Unlike viruses worms duplicate over the network and bypass basic security such as encryption.

Logic Bomb
A peice of coding that can be part of a program or worm or virus. A logic bomb only executes its function when a certain condition is met. This condition is programed by its creator and so is its function. A logic bomb that executes its function at a predetermined time is called a time bomb.