A virus is a piece of malicious code that interferes with the normal functioning of a system and damages the way it operates. It is self-replicating in nature and copies itself or attaches itself to other legitimate programs and runs when that program runs.
Port knocking is an authentication technique used to open closed ports which are behind a firewall. It is mainly used to prevent hackers from doing a port scan and is one of the security measures a network administrator takes to secure the network.
Anti-spyware and antivirus are two security measures to protect systems from being attacked by viruses and malwares. One single security solution is not enough to fight all threats and dangers. That's why the combined use of both of these softwares is often recommended to increase the safety of a system.
A trojan horse (also called trojan) is a kind of malware that impacts a user's system in the garb of legitimate software. It is capable of modifying, stealing, blocking and deleting user data without the user's consent.