The insular cortex seems to play a role in sorting based on salience - how important something is to us (Uddin, 2015). In addition, the anterior cingulate cortex (ACC), commonly associated with error detection, is relevant. Some parts of the insular cortex have also been linked to a sense of self, so this seems reasonable.
The mental activities involved include: detection (What?), attention (Where?), categorical learning (How?), and planning (Which - when?). There are thousands of studies on visual search, visual attention, stimulus detection, salience processing, and categorical learning. Categorical learning implies that one can improve in the process of categorization, but attention is a prerequisite for learning to occur, so multiple brain areas are involved.
Reference
Uddin, L. Q. (2015). Salience processing and insular cortical function and dysfunction. Nature Reviews Neuroscience, 16, 55–61. doi:10.1038/nrn3857
http://www.nature.com/nrn/journal/v16/n1/abs/nrn3857.html