Srimad Bhagavatam Canto 03, Chapter 12, Text 41

SB 3.12.41

vidya danam tapah satyam
 dharmasyeti padani ca
asramams ca yatha-sankhyam
 asrjat saha vrttibhih
 
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
Education, charity, penance and truth are said to be the four legs of religion, and to learn this there are four orders of life with different classifications of castes according to vocation. Brahma created all these in systematic order.
 
Purport by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
The nucleus of the four social orders — brahmacarya, or student life, grhastha, or householder family life, vanaprastha, or retired life for practicing penance, and sannyasa, or renounced life for preaching the truth — is the four legs of religion. The vocational divisions are the brahmanas, or the intelligent class, the ksatriyas, or administrative class, the vaisyas, or mercantile productive class, and the sudras, or general laborer class who have no specific qualifications. All were systematically planned and created by Brahma for the regular promotion of self-realization. Student life is meant for acquiring the best education; household family life is meant for gratifying the senses, provided it is performed with a charitable disposition of mind; retirement from household life is meant for penance, for advancement in spiritual life; and renounced life is meant for preaching the Absolute Truth to the people in general. The combined actions of all members of society make the whole situation favorable for the upliftment of the mission of human life. The beginning of this social institution is based on education meant for purifying the animal propensities of the human being. The highest purificatory process is knowledge of the Supreme Personality of Godhead, the purest of the pure.
Srimad Bhagavatam Canto 03, Chapter 12, Text 40
Srimad Bhagavatam Canto 03, Chapter 12, Text 42