The four castes are Brahmana, Kshatriya, Vaisya and Sudra.
This division is according to the Guna (Quality of Mind and Karma (Kind of Work done).
Both Guna and Karma determine the caste of a man.

Sattwa is good, Rajas is passionately active, Tamas is dullness and inertia.

In a Brahmana, Sattwa predominates. He possesses serenity, purity, self-restraint, straightforwardness and devotion.
In a Kshatriya, Rajas predominates. He possesses prowess, splendour, firmness, dexterity, generosity and rulership.
In a Vaisya, Rajas predominates and and less of Tamas. He does the duty of ploughing, protection of cattle and trade.
In a Sudra, Tamas predominates and less of Rajas. He is not capable of having the predominance of the above qualities.