From MEXT, “One Hundred Years of the School System”.
A terakoya was a small school where a writing teacher gathered about 20 children and taught them to write.
The teacher was called the shisho, and the students were called terako. Most teachers also ran the school themselves.
Because of the name, people often think the teachers were monks. In fact, across Japan most teachers were commoners. Samurai and monks came next, and some were Shinto priests or doctors.
Most of the time was spent on tenarai, practice in writing. Reading was added to it.
Children began with the iroha (the kana) and numbers. Then they wrote the calendar signs, directions, the names of towns and villages, and the names of the provinces.
At first they copied a model written by the teacher. After that they studied textbooks called ōraimono. Many ōraimono were collections of letters and everyday words.
By the end of the Edo period, many terakoya taught reading, writing and arithmetic together.
Terakoya began to grow from the middle of the Edo period. By the end of the period there were many of them in Edo and Osaka, in small towns, and even in farming, mountain and fishing villages.
In 1872 Japan started its new school system, and elementary schools opened all over the country in a short time. MEXT says this was possible mainly because terakoya had already spread so widely.
There is no single right answer. Talking it over with someone at home is a good way to learn.