What were the jobs and roles of each tier of the caste system?

What were the jobs and roles of each tier of the caste system?