Electroencephalography (EEG) can reflect changes in brain activity under different states. The electrical signals of the brain are observed to exhibit varying amplitudes and frequencies. These variations are closely linked to different states of consciousness, influencing the internal and external behaviors, emotions, and learning performance of humans. The assessment of personal level of attention, which refers to the ability to consciously focus on something, can also be facilitated by these signals. Research on brain attention aids in the understanding of the mechanisms underlying human cognition and behavior. Based on the characteristics of EEG signals, this research identifies the most effective method for detecting brain attention by adapting various preprocessing and machine learning techniques. The results of our analysis on a publicly available dataset indicate that KNN with the feature importance feature extraction method performed the best, achieving 99.56% accuracy, 99.67% recall, and 99.44% precision with a rapid training time.