Phishing attacks have evolved into advanced cyber threats, leading to substantial financial losses, data breaches, and eroding trust in digital platforms. Conventional detection methods, such as rule-based systems and blacklists, have become increasingly inadequate against ever-evolving phishing tactics. This study investigates the effectiveness of machine learning (ML) algorithms in detecting and mitigating phishing attacks, employing a balanced dataset of 10,000 instances (5,000 phishing and 5,000 legitimate websites) sourced from both PhishTank and the UCI Machine Learning Repository. Essential attributes, encompassing URL-based, content-based, and domain-based features, were extracted and preprocessed for training and evaluating four ML algorithms: Decision Trees, Random Forests, Support Vector Machines (SVM), and Neural Networks (Multi-layer Perceptron). The models underwent hyperparameter tuning and were evaluated using 5-fold cross-validation. Metrics such as accuracy, precision, recall, and F1-score were employed to gauge each algorithm's performance. Results reveal that Neural Networks achieved the highest accuracy (94%), followed by Random Forests (92%), SVM (88%), and Decision Trees (85%). Among the evaluated models, Neural Networks demonstrated superior capability in capturing subtle, non-linear patterns, whereas Random Forests provided consistent performance and greater resilience to noisy data. Decision Trees were fast and interpretable but prone to overfitting, whereas SVM models required significant computational resources. This research emphasizes the potential of ML algorithms, particularly Neural Networks and Random Forests, in advancing phishing detection systems. Additionally, it highlights the necessity of incorporating ML with other cybersecurity strategies, such as user education and multi-factor authentication, to develop a comprehensive defense against phishing threats. The study presents actionable recommendations for enhancing real-time phishing detection and addressing the rapidly evolving cybersecurity landscape.