The improvement of Artificial Intelligence (AI) and Machine Learning (ML) can help radiologists in tumor diagnostics without invasive measures. Magnetic resonance imaging (MRI) is a very useful method for diagnosis of tumors in human brain. In this paper, brain MRI images have been analyzed to detect the regions containing tumors and classify these regions into three different tumor categories: meningioma, glioma, and pituitary. This paper presents the implementation and comparison of various enhanced ML algorithms for the detection and classification of brain tumors. A brain tumor is the growth of abnormal cells in the human brain. Brain tumors can be cancerous or non-cancerous. Cancerous or malignant brain tumors can be life threatening. Hence, detection and classification of brain tumors at an early stage is extremely important. In this paper, enhanced ML algorithms have been implemented to predict the presence or the absence of brain tumors using binary classification and to predict whether a patient has brain tumor or not and if he does, detect the type of brain tumor using multi-class classification. The dataset that has been used to perform the binary classification task comprises of two types of brain MRI images with tumor and without tumor. Here nine ML algorithms namely, Support Vector Machine (SVM), Logistic Regression, K-Nearest Neighbor (KNN), Naïve Bayes (NB), Decision Tree (DT) classifier, Random Forest classifier, XGBoost classifier, Stochastic Gradient Descent (SGD) classifier and Gradient Boosting classifier have been used to classify the MRI images. A comparative analysis of the ML algorithms has been performed based on a few performance metrics such as accuracy, recall, and precision, F1-score, AUC-ROC curve and AUC-PR curve. Gradient Boosting classifier has outperformed all the other algorithms with an accuracy of 92.4%, recall of 94.4%, precision of 85%, F1-score of 89.5%, AUC-ROC of 97.2% and an AUC-PR of 91.4%. To address the multi-class classification problem, four ML algorithms namely, SVM, KNN, Random Forest classifier and XGBoost classifier have been employed. In this case, the dataset that has been used consists of four types of brain MRI images with glioma tumor, meningioma tumor, and pituitary tumor and with no tumor. The performances of the ML algorithms have been compared based on accuracy, recall, precision and the F1-score. XGBoost classifier has surpassed all the other algorithms in terms of accuracy, precision, recall and F1-score. XGBoost has produced an accuracy of 90%, precision of 90%, and recall of 90% and F1-score of 90%.