This study presents a comparative analysis of various convolutional neural network (CNN) models for brain tumor detection on MRI medical images. The primary aim was to assess the effectiveness of different CNN architectures in accurately identifying brain tumors. Multiple models were trained, including a custom-designed CNN with its specific layer architecture, and models based on Transfer Learning utilizing pre-trained neural networks: ResNet-50, VGG-16, and Xception. Performance evaluation of each model in terms of accuracy metrics such as precision, recall, F1-score, and confusion matrix on a test dataset was carried out. The dataset used in this study was obtained from the openly accessible Kaggle competition "Brain Tumor Detection from MRI." This dataset consisted of four classes: glioma, meningioma, no tumor (healthy), and pituitary, ensuring a balanced representation. Testing four models revealed that the custom CNN architecture, utilizing separable convolutions and batch normalization, achieved an average ROC AUC score of 0.99, outperforming the other models. Moreover, this model demonstrated an accuracy of 0.94, indicating its robust performance in brain tumor classification on MRI images.