The Internet of Vehicles (IoV) has transfigured transportation with connected vehicles, smart infrastructure, and self-driving cars. Road collisions and accidents are still a problem for road safety. This review of the literature discusses the prediction of IoV accidents and collisions as well as the detection of hazards using data mining, deep learning, and machine learning techniques. It describes the most recent developments to these methods and how they enhanced IoV safety. The article starts off by going over data collection, data quality, and the ever-changing nature of IoV traffic scenarios. What follows is a detailed breakdown of the ML, DL, and DM methods used in IoV safety applications. Convolutional neural networks, artificial neural networks, recurrent neural networks, support vector machines, and decision trees. As examples of real-world applications and case studies, intelligent accident prediction models, driver attention forecasting, traffic congestion forecasting, spatiotemporal analysis in autonomous vehicles, scene-graph embedding, and V2P collision risk alerts are discussed. The goal of this review is to give readers a comprehensive overview of the cutting-edge methods enhancing IoV accident prediction, collision avoidance, and hazard detection.