Firewall is a protection device for a computer. This disbles other programs from entering. There are many anti virus programs. Please search on google for detailed explanation of firewall and other protection programs.
Firewall software prevents worms and some malicious software from entering computers via network.s
Malwarebytes is another good tool for removing malicious software
I think you can post these type of questions to Q n A as it will be more relavent. Also we can quickly find out if we want to see that again in future.