A public school means different things in different countries:

USA and Canada 
In the United States and Canada, public schools are schools that are paid for by the government. They are open to all students who live nearby without any charge. They are usually paid for through property taxes that are applied to everyone who owns buildings in the area around the school.

Public schools greatly expanded  in the United States in the 19th century. Every U.S. state now has free public schools.

Some people think that public schools have done a bad job of education in the United States. One solution has been to give "vouchers" to parents that help them send their children to private schools. Critics say this takes money away that could go to improving public schools.

UK and Commonwealth 
In the United Kingdom, public schools are independent fee-paying schools like Eton College. They are called 'public' because they accept students from anywhere  not just people living nearby in the school area. Some are boarding schools, where students can sleep and live at school during the school term. The public schools have an association called the Headmasers' and Headmistresses' Conference. Junior schools which prepare children for entry into public schools are called Preparatory schools ('prep' schools).

The term "public school", for what are actually privately owned schools, is historical. It dates from the UK Public Schools Act 1868 which set the framework for seven leading English boys' schools, which were:
Charterhouse School
Eton College
Harrow School
Rugby School
Shrewsbury School
Westminster School
Winchester College
To these should be added other fee-paying schools which have first-class reputations. These would include:
Merchant Taylors' School
St. Paul's School
Tonbridge School
Dulwich School
Wellington School

Others of note include Fettes College in Edinburgh, which is co-educational. This is very unusual for a public school. By independent" is meant fee-paying, and therefore not run by the public authorities.

Public schools have a very good record of getting their pupils into elite universities, such as Cambridge and Oxford. They educate the sons and daughters of the British upper and upper-middle classes. In particular, the sons of officers and senior administrators of the British Empire were educated in England while their parents were on overseas postings. In 2010, over half of Cabinet Ministers had been educated at public schools. In 2018, annual fees at Eton were up to £48,500 for boarders. Therefore, although some scholarships are available, most students come from wealthy families.

Two twenty-first century Prime Ministers, Tony Blair and David Cameron, were educated at public schools, as were a high proportion of those in previous centuries. 

The leading public schools are challenged only by Manchester Grammar School, which was for many years the leading state-funded grammar school. It is now a fee-paying independent school. It made this change when the Labour government in 1976 chose to abolish the Direct Grant System. This would have given the government powers to change the school in ways with which it did not agree.

Girls' schools 
Public schools for girls have a similar unofficial ranking, though more of them are day schools. The best-known girls public school is Cheltenham Ladies' College. The Girls' Schools Association (GSA) is the body for independent girls' schools. It has over a hundred schools as members. The GSA is a member of the Independent Schools Council.

First, an historical note. Up to and including the 19th century girls from "good families" were educated at home by governesses and tutors. This applies very widely across the world, not just in England. The other controversial issue is whether girls should be educated with boys or not. Here the United States is one extreme and Muslim countries the other extreme. Even in England, co-education is almost universal at primary level, but are not common at secondary level except in the state education sector.

Another point of difference in England is that girls from wealthy families are more likely to be educated abroad than are boys. Expensive independent schools in French-speaking Switzerland are often chosen. It has not gone unnoticed that, by having such options, the wealthy give their children advantages which the children of ordinary people never get.

Well-known girls' public schools are:
Cheltenham Ladies' College
Bedford Girls' School
James Allen's Girls' School: Known as "JAGS": a day school
Haberdashers' Aske's School for Girls
Manchester High School for Girls

References

Related pages 
Co-education

References 

Types of educational institutions
Schools in the United Kingdom
Schools in the United States