Brain cancer remains one of the most challenging medical conditions due to its intricate nature and the critical functions of the brain. Effective diagnostic and treatment strategies are essential, particularly given the high stakes involved in early detection. Magnetic Resonance (MR) imaging has emerged as a crucial modality for the identification and monitoring of brain tumors, offering detailed insights into tumor morphology and behavior. Recent advancements in artificial intelligence (AI) and machine learning (ML) have revolutionized the analysis of medical imaging, significantly enhancing diagnostic precision and efficiency. This study classifies three primary brain tumor types—glioma, meningioma, and general brain tumors—utilizing a comprehensive dataset comprising 15,000 MR images obtained from Kaggle. We evaluated the performance of six distinct machine learning models: K-Nearest Neighbors (KNN), Neural Networks, Logistic Regression, Support Vector Machine (SVM), Decision Trees, and Random Forests. Each model's effectiveness was assessed through multiple metrics, including classification accuracy (CA), Area Under the Curve (AUC), F1 score, precision, and recall. Our findings reveal that KNN and Neural Networks achieved remarkable classification accuracies of 98.5% and 98.4%, respectively, significantly surpassing the performance of other evaluated models. These results underscore the promise of ML algorithms, particularly KNN and Neural Networks, in improving the diagnostic process for brain cancer through MR imaging. Future research will focus on validating these models with real-world clinical data, aiming to refine and enhance diagnostic methodologies, thus contributing to the development of more accurate, efficient, and accessible tools for brain cancer diagnosis and management.