In the digital era, online radicalization has emerged as a significant concern for governments, social media platforms, and researchers. Detecting and preventing online radicalization have become key priorities, leading to extensive research efforts. This study presents a comprehensive survey of existing works in this field, covering various techniques and methodologies. An extensive assessment of 68 publications from databases such as IEEE, SCOPUS, and Web of Science (WoS) was conducted to analyze recent literature on detecting and preventing online radicalization. This research provides an overview of the definition of online radicalization and its relationship with social media. It explores different types and sources of datasets used in studying online radicalization. Additionally, it categorizes approaches and techniques, including Machine Learning (ML), Deep Learning (DL), and Graph algorithms, for detecting and preventing online radicalization. The survey identifies limitations and challenges in the field, highlighting existing gaps and suggesting potential directions for further study. To the best of the authors' knowledge, this work is the first of its kind to undertake such a holistic investigation that consolidates these methodologies presenting them in an accessible manner. The findings contribute as a valuable resource for academics, decision-makers, and professionals working in the field of counter-radicalization and provide insights into existing countermeasures against this expanding threat.