Due to the unpredictable interruptions within the functions of the human brain, disturbance occurs and it affects the behavior of the human and is equally laid low with the frequent occurrence termed as seizures. Therefore, the proposed system detects the seizure using machine learning algorithms. The electroencephalogram (EEG) contains information of the brain to detect the seizure. The objective is to evaluate the performance of machine learning classifiers K-nearest neighbors (KNN), artificial neural network (ANN), support vector machine (SVM) and principal component analysis (PCA) by comparing the accuracy of the classifier. This work uses total of 11,500 EEG samples from the UCI machine learning repository. The seizure detection was done in two ways. First method, features extracted from the EEG signal and classification techniques are done to classify the seizure. The second method uses the principal component analysis algorithm to improve the significant selections of features from the dataset. The outcomes are analyzed using the statistical package for the social science (SPSS) tools. ANN with extracted functions achieved 96% of accuracy and significant efficiency of (p less than 0.05) in comparison with different machine learning classifiers. It would be prudent to conclude that the ANN demonstrated the best accuracy, sensitivity, and specificity.