Attacks on computer systems have been a persistent and unwanted problem since computers were first created. Despite using various security measures, the threats to security have increased as technology has advanced. With the world relying heavily on computers, it's crucial to protect them from harmful activities that could harm their functioning. To secure computer systems, especially within networks, Intrusion Detection Systems (IDS) and Intrusion Prevention Systems (IPS) are commonly used. These systems are essential for making sure that computer environments are safe and secure, especially as security challenges grow. As technology progresses, incorporating Artificial Intelligence (AI) into IDS and IPS technologies makes them even more effective in detecting and preventing intrusions. This strengthens the overall security of computer systems. The goal of this research is to explore how AI methods can enhance IDS and IPS systems.