The Role of AI in Cybersecurity : Threat Detection and Prevention