In the decades before the Civil War, white Southerners used various techniques as both individuals and a society to keep African Americans "in their place."
First, at the individual level, white slave owners sometimes used methods of punishment to control their slaves. Beatings, loss of privileges, and even the deprivation of the necessities of life were used to keep slaves at work and under control. Sometimes owners also used the threat of sale to keep their slaves obedient. This was especially effective when slave families worried about being split up and never seeing their loved ones again. Please note, however, that not all slave owners practiced these methods.
At the level of society, the slave codes were used to control African Americans. Slaves could not marry, travel without permission, gather without a white person present, or earn money of their own. Teaching slaves to read and write was actually illegal. Slaves could not receive fair trials (or often any trial at all), nor could they testify against white people. Slave patrols kept a sharp look out for any violations of these codes as well as for runaways.
After the Civil War, African Americans were no longer slaves, but many white Southerners still used a variety of techniques to keep them "in their place." Intimidation was sometimes used for African Americans who became "uppity," and we can think of the activities of the KKK as the most vivid example of such tactics.
Sharecropping also kept African Americans working on the land. Landowners gave sharecroppers a piece of land to work in return for part of their crops, but sharecroppers often ended up deeply in debt to landlords or local stores or both, especially when crops were poor.
African American males received the right to vote after the Civil War, but that right was sharply curtailed in the years that followed. Poll taxes, literacy tests, and intimidation kept many African Americans from exercising their right to vote.
Finally, as the years passed, a system of segregation was set in place under the Jim Crow laws. African Americans had separate housing and schools, separate hospitals and jails, separate entrances and waiting rooms, separate restrooms and drinking fountains. These accommodations were supposed to be "separate but equal," but of course, they never were.