Cyber security prevents cyber attacks by implementing various measures to secure computer systems, networks, and devices. This can include installing firewalls, antivirus software, and IDPS, as well as implementing strong passwords, regular software updates, and safe practices such as two-factor authentication.