Boosting Security with AI: A Complete Guide