Security is a very real concern for any computer connected to a network or the Internet. There are three main categories of security threats:
Ironically, this is the type of attack most people fear, but realistically, it is the least likely to occur, at least where home and small office networks are concerned. It's possible for a so-called hacker to obtain access to your computer, either through your Internet connection or from another computer on your local network; just not terribly likely that such a hacker will bother.
A virus is a computer program that is designed to duplicate itself with the purpose of infecting as many computers as possible. If your networked computer is infected by a virus, it might use your network connection to infect other computers; likewise, if another computer on your network is infected, your computer is vulnerable to infection. The same goes for Internet connections, although the method of transport is typically an infected email attachment.
There also exist so-called robots, programs that are designed to scan large groups of IP addresses, looking for vulnerabilities. The motive for such a program can be anything from exploitation of credit card numbers or other sensitive information to the hijacking of computers for the purpose of distributing spam, viruses, or extreme right-wing propoganda.