Primary (or elementary) education consists of the first 5–7 years of formal, structured education. In general, primary education consists of six or eight years of schooling starting at the age of five or six, although this varies between, and sometimes within, countries. Globally, around 89% of primary-age children are enrolled in primary education, and this proportion is rising.[8] Under the Education For All programs driven by UNESCO, most countries have committed to achieving universal enrollment in primary education by 2015, and in many countries, it is compulsory for children to receive primary education.

The division between primary and secondary education is somewhat arbitrary, but it generally occurs at about eleven or twelve years of age. Some education systems have separate middle schools, with the transition to the final stage of secondary education taking place at around the age of fourteen. Schools that provide primary education, are mostly referred to as primary schools. Primary schools in these countries are often subdivided into infant schools and junior school.

In India, compulsory education spans over twelve years, out of which children receive elementary education for 8 years. Elementary schooling consists of five years of primary schooling and 3 years of upper primary schooling. Various states in the republic of India provide 12 years of compulsory school education based on national curriculum framework designed by the National Council of Educational Research and Training.

Students in a classroom at Samdach Euv High School, Cambodia
In most contemporary educational systems of the world, secondary education comprises the formal education that occurs during adolescence. It is characterized by transition from the typically compulsory, comprehensive primary education for minors, to the optional, selective tertiary, “post-secondary”, or “higher” education (e.g. university, vocational school) for adults. Depending on the system, schools for this period, or a part of it, may be called secondary or high schools, gymnasiums, lyceums, middle schools, colleges, or vocational schools. The exact meaning of any of these terms varies from one system to another. The exact boundary between primary and secondary education also varies from country to country and even within them, but is generally around the seventh to the tenth year of schooling. Secondary education occurs mainly during the teenage years. In the United States, Canada and Australia primary and secondary education together are sometimes referred to as K-12 education, and in New Zealand Year 1–13 is used. The purpose of secondary education can be to give common knowledge, to prepare for higher education or to train directly in a profession.
The emergence of secondary education in the United States did not happen until 1910, caused by the rise in big businesses and technological advances in factories (for instance, the emergence of electrification), that required skilled workers. In order to meet this new job demand, high schools were created, with a curriculum focused on practical job skills that would better prepare students for white collar or skilled blue collar work. This proved to be beneficial for both employers and employees, for the improvement in human capital caused employees to become more efficient, which lowered costs for the employer, and skilled employees received a higher wage than employees with just primary educational attainment.
In Europe, grammar schools or academies date from as early as the 16th century, in the form of public schools, fee-paying schools, or charitable educational foundations, which themselves have an even longer history.

Autodidacticism (also autodidactism) is self-directed learning that is related to but different from informal learning. In a sense, autodidacticism is “learning on your own” or “by yourself”, and an autodidact is a self-teacher. Autodidacticism is a contemplative, absorbing process. Some autodidacts spend a great deal of time reviewing the resources of libraries and educational websites. One may become an autodidact at nearly any point in one’s life. While some may have been informed in a conventional manner in a particular field, they may choose to inform themselves in other, often unrelated areas. Notable autodidacts include Abraham Lincoln (U.S. president), Srinivasa Ramanujan (mathematician), Michael Faraday (chemist and physicist), Charles Darwin (naturalist), Thomas Alva Edison (inventor), Tadao Ando (architect), George Bernard Shaw (playwright), Frank Zappa (composer, recording engineer, film director),and Leonardo da Vinci (engineer, scientist, mathematician).