In the time right after the Civil War, the South tried to reinstate the social (and racial) hierarchy largely through the creation of the “black codes.” After this was done away with by the Reconstruction governments, the South later tried to create the same effect through violence. After Reconstruction, various legal and economic ploys recreated the hierarchy.
During Reconstruction, the Reconstruction governments tried to upend the previous hierarchy by allowing African Americans to have legal and political rights. This was partly in response to the South’s creation of the black codes. The South did not want African Americans to have these rights and they tried to resist through violence and intimidation such as that committed by the KKK.
After the end of Reconstruction, the Southern governments were able to act openly to recreate white supremacy. They did this through such things as the Jim Crow laws and the laws that prevented African Americans from voting. At the same time, economic developments helped to create hierarchy as well. The institution of the sharecropping and crop-lien systems ensured that blacks (and poor whites) would be economically subjugated to the rich whites.