Hello!
The Plessy v. Ferguson Supreme Court case ruled that racial segregation was constitutional, as long as it remained under the "separate but equal" doctrine.
The "separate but equal" doctrine made it legal to segregate people into separate public facilities as long as the facilities remained equal for all races.
However, the facilities for African Americans were not equal to those of white Americans. White Americans regularly received better treatment, cleaner public facilities, and better schooling.
The schooling and educational opportunities were noticed to be unequal, and this later lead to the court case known as Brown v. Board of Education. Brown v. Board of Education decided that the "separate but equal" doctrine was unconstitutional. This fortunately overturned the Plessy v. Ferguson ruling, and schools and other public facilities slowly became integrated. This ruling posed as the beginning of the end of racial segregation in America.
I hope this helps answer your question!