The Role of AI in Cybersecurity: Protecting Against Threats