Schooling in Spain is compulsory between ages 6-16 and is typically state-funded. There are three types of schools - state schools, privately run schools funded by the state, and purely private schools. Primary education subjects include Spanish, math, sciences, social sciences, physical education, and at least one foreign language. Secondary education consists of four years with core academic subjects in the first two years and more options in the final two years, preparing students for vocational training or university. Students can also pursue vocational training or university directly after secondary school. Teachers can be civil servants with jobs guaranteed, substitute teachers who move between schools, or hired by private schools.