Segregation, or racial segregation by definition, is the systematic seperation of people.
In 1865, the Civil War came to an end and officially abolished slavery in America. However, it did not grant any human rights to freed slaves. Fast forward 27 years later, in 1892, Homer Plessy, a mixed man living in New Orleans, was arrested when he tried to sit in an all-white train car. Plessy and his lawyers felt like his arrest was unconstitutional, since he was half white and knew French. In April of 1896, the landmark case, Plessy v. Ferguson went to court, and a month later, the US supreme court decided that racial segregation was constitutional, meaning Plessy lost his case. The case created the separate but equal doctrine, and upheld the infamous Jim Crow Laws.
Jim Crow was originally created by Thomas D. Rice and was a racist caricature and depiction of African Americans and their culture. It was re-imagined as a set of laws in the 1870s and 80s and enforced until 1965. These laws withheld basic human rights from African Americans that their white counterparts had, like the right to vote. In the South, blacks and whites were separated in every aspect of life. They were not able to attend the same school, drink from the same water fountain, sit at the same lunch counter, etc.