When you connect to the internet, you are actually connecting to thousands of very many computers around the world. When you come online, you are actually like in a fair just like the fair you will gain some good things and might even end up with bad elements attack you or loot you. Just similar to that when you are online, you are actually gaining useful knowledge but also there is a chance that your computer might be looted or in geek term hacked!
Yes, hacking is a term where someone on the other end of the world get access to your computer without your knowledge through various programs that they develop and sometimes loot your personal info from your PC. You should protect your PC from such attacks. You can actually prevent such attacks through a software, Firewall. Yes, as the name suggests, this program will act just like a fire wall for your PC and protect any unwanted intrusions to your pc both incoming and outgoing. Outgoing access might be due to some utilities or softwares that you have installed in your computer which might be programmed to share your personal info to a server situated elsewhere.
To protect yourself from any attacks both incoming and outgoing, it is really advisable to protect your PC with firewall. The best known firewall software is ZoneAlarm, which is the only software you might need to protect your PC from such attacks. Or you can even try various such freewares available to use as a firewall.