AI in Cybersecurity: Enhancing Threat Detection and Response