What exactly were Jim Crow laws?  What was the purpose of Jim Crow?
The Jim Crow laws were state and local laws written up in the South in the late 19th and early 20th centuries that enforced racial segregation, "Jim Crow" being a slang and derogatory term for an African-American. There were added addendums that banned interracial marriage and separation between races in public and places of business were also common parts of Jim Crow.

These laws were created to reinforce racial segregation in the South between the end of reconstruction from the Civil War in 1877 and the beginning of the civil rights movement in the 1950s.

Restrictions imposed by the black codes made it hard for formerly enslaved people to gain economic independence. Segregated facilities on all public transportation carriers made it more difficult for black citizens to travel. The “separate but equal” doctrine resulted in facilities of lower quality for blacks ranging from schools to housing to employment. This was to ensure Black children had limited opportunities compared with those white children. Jim Crow laws in most if not ALL of the Southern states made it impossible for black citizens to vote, be elected to office, serve on juries, or participate as equals in the economic or social life of their area.