with the arrival of information age, network has become an essential part of people's life, no longer exists as a tool. At the same time, network security has attracted more and more attention. In order to make the network more secure and reliable to play its value, understanding the main threat and its countermeasures of the current computer network is very necessary. This article first makes a brief introduction to the computer network security, introduces the concept, the development present situation and development trend, then expounds the computer network of the main threats, including five aspects such as hackers, spyware, computer virus and so on. Finally discusses the commonly used 5 prevention technologies at present, including firewall technology, antivirus technology, data encryption technology, intrusion detection technology and access control technology. Only by paying attention to network security can we protect our own interests.