Education in Indonesia falls under the responsibility of the Ministry of Education, Culture, Research, and Technology (Kementerian Pendidikan, Kebudayaan, Riset, dan Teknologi or Kemdikbudristek) and the Ministry of Religious Affairs (Kementerian Agama or Kemenag). In Indonesia, all citizens must undertake twelve years of compulsory education which consists of six years at elementary level and three each at middle and high school levels. Islamic, Christian and Buddhist schools are under the responsibility of the Ministry of Religious Affairs.
Education is defined as a planned effort to establish a study environment and educational process so that the student may actively develop their own potential in religious and spiritual level, consciousness, personality, intelligence, behaviour and creativity to themselves, other citizens and the nation. The Constitution also notes that there are two types of education in Indonesia: formal and non-formal. Formal education is further divided into three levels: primary, secondary and tertiary education.
Schools in Indonesia are run either by the government (negeri) or private sectors (swasta). Some private schools refer to themselves as "national plus schools" which means that their curriculum exceeds requirements set by the Ministry of Education, especially with the use of English as medium of instruction or having an international-based curriculum instead of the national one. In Indonesia there are approximately 170,000 primary schools, 40,000 junior-secondary schools and 26,000 high schools. 84 percent of these schools are under the Ministry of Education and Culture and the remaining 16 percent under the Ministry of Religious Affairs.
The emergence of Islamic state in Indonesia is noted by the acculturation of Islamic and Hindu-Buddhist traditions. At this time, pondok pesantren, a type of Islamic boarding school was introduced and several of them were established. The location of pesantren is mostly faraway from the hustling crowd of the city, resembling the location of Karsyan.