According to Theravada Buddhism, there are 52 important mental factors as listed below, that help to understand how the mind functions. (although, this list is not exhaustive).
Seven universal mental factors: Common to all consciousness. These factors perform the most rudimentary and essential cognitive functions, without which consciousness of an object would be utterly impossible. The factors are:
Phassa - contact
Vedana - feeling
Sanna - perception
Cetana - volition
Ekaggata - one-pointedness
Jivitindriya - life faculty
Manasikara - attention.
Six occasional or particular mental factors: Ethically variable mental factors found only in certain consciousnesses. They are:
Vitakka - Application of thought
Vicara - Examining
Adhimokkha - Decision
Viriya - Energy
Piti - Rapture
Chanda - Desire (to act).
Fourteen unwholesome mental factors: Accompany the unwholesome consciousnesses. These factors are:
Four universal unwholesome mental factors:
Moha - delusion
Ahirika - lack of shame
Anottappa - disregard for consequence
Uddhacca - restlessness
Three mental factors of the greed-group (lobha):
Lobha - greed
Ditthi - wrong view
Mana - conceit
Four mental factors of the hatred-group (dosa)
Dosa - hatred
Issa - envy
Macchariya - miserliness
Kukkucca - regret
Other unwholesome mental factors
Thina - sloth
Middha - torpor
Vicikiccha - doubt.
Unwholesome consciousness is consciousness accompanied by one or another of the three unwholesome roots—greed, hatred, and delusion. Such consciousness is called unwholesome because it is mentally unhealthy, morally blameworthy, and productive of painful results.
Twenty-five beautiful mental factors: Accompany the wholesome consciousnesses. They are:
Nineteen universal beautiful mental factors:
Saddha - faith
Sati - mindfulness
Hiri - shame at doing evil
Ottappa - regard for consequence
Alobha - lack of greed
Adosa - lack of hatred
Tatramajjhattata - balance, the neutrality of mind
Kayapassaddhi - tranquillity of mental body
Cittapassaddhi - tranquillity of consciousness
Kayalahuta - lightness of mental body
Cittalahuta - lightness of consciousness
Kayamuduta - malleability/softness of mental body
Cittamuduta - malleability/softness of consciousness
Kayakammannata - wieldiness of the mental body
Cittakammannata - wieldiness of consciousness
Kayapagunnata - proficiency of mental body
Cittapagunnata - proficiency of consciousness
Kayujukata - straightness/rectitude of mental body
Cittujukata - straightness/rectitude of consciousness.
Three Abstinences (virati):
Sammavaca - right speech
Sammakammanta - right action
Samma-ajiva - right livelihood
Two Immeasurables (appamanna):
Karuna - compassion
Mudita - sympathetic joy
One Faculty of wisdom (pannindriya):
Panna - wisdom.
Wholesome consciousness is consciousness accompanied by the wholesome roots—non-greed or generosity, non-hatred or loving-kindness, and non-delusion or wisdom. Such consciousness is mentally healthy, morally blameless, and productive of pleasant results.