Public school or state school are education institutes designed to teach all members of the community. Historically schools only limited to select members, mostly the wealthy or clergy.
Boston Latin School opened on 13th of April, 1635 and is credited at the first public school open to all young men but was more limited to upper class. But it was not until 1647 the General Court of the Massachusetts Bay Colony decreed the need for elementary and Latin schools and mandated it and other to serve all and taught Puritan values and reading of the Bible.
1785 saw the Continental Congress of the United States with it survey of the Northwest Territory goal to create townships, mandated a portion of each one reserved for a school.
In 1790, the state constitution in Pennsylvania required free public education for children in families that could not afford to pay for an education. In 1820, Boston again becomes the first to site a secondary school. And in 1827, a Massachusetts law makes all grades of public school free to all.
But the first place to make modern public education compulsory was Prussia in 1819. Though the Judea in in 1AD practiced it.