After the Civil War, there was a period from about 1865 to 1877 where federal laws offered observable protection of civil rights for former slaves and free blacks; it wasn't entirely awful to be an African American, even in the South. However, starting in the 1870s, as the Southern economy continued its decline, Democrats took over power in Southern legislatures and used intimidation tactics to suppress black voters. Tactics included violence against blacks and those tactics continued well into the 1900s. Lynchings were a common form of terrorism practiced against blacks to intimidate them. It is important to remember that the Democrats and Republicans of the late 1800s were very different parties from their current iterations. Republicans in the time of the Civil War and directly after were literally the party of Lincoln and anathema to the South. As white, Southern Democrats took over legislatures in the former Confederate states, they began passing more restrictive voter registration and electoral laws, as well as passing legislation to segregate blacks and whites.
It wasn't enough just to separate out blacks - segregation was never about "separate but equal." While the Supreme Court naively speculated in Plessy v. Ferguson that somehow mankind wouldn't show its worst nature and that segregation could occur without one side being significantly disadvantaged despite all evidence to the contrary, we can look back in hindsight and see that the Court was either foolishly optimistic or suffering from the same racism that gripped the other arms of the government at the time. In practice, the services and facilities for blacks were consistently inferior, underfunded, and more inconvenient as compared to those offered to whites - or the services and facilities did not exist at all for blacks. And while segregation was literal law in the South, it was also practiced in the northern United States via housing patterns enforced by private covenants, bank lending practices, and job discrimination, including discriminatory labor union practices. This kind of de facto segregation has lasted well into our own time.
The era of Jim Crow laws saw a dramatic reduction in the number of blacks registered to vote within the South. This time period brought about the Great Migration of blacks to northern and western cities like New York City, Chicago, and Los Angeles. In the 1920s, the Ku Klux Klan experienced a resurgence and spread all over the country, finding a significant popularity that has lingered to this day in the Midwest. It was claimed at the height of the second incarnation of the KKK that its membership exceeded 4 million people nationwide. The Klan didn't shy away from using burning crosses and other intimidation tools to strike fear into their opponents, who included not just blacks, but also Catholics, Jews, and anyone who wasn't a white Protestant.
This time period was not without its triumphs for blacks, even if they came at a cost or if they were smaller than one would have preferred. The NAACP was founded in 1909, in response to the continued practice of lynching and race riots in Springfield, Ill. From the 1920s through the 1930s in Harlem, New York, a cultural, social, and artistic movement took place that was later coined the Harlem Renaissance. Musicians like Duke Ellington and Jelly Roll Morton, writers such as Zora Neale Hurston and Langston Hughes, it-girls like Josephine Baker, and philosophers like W.E.B. Du Bois all had a hand in the Harlem Renaissance and American culture as a whole is richer and better for it.