The Black Codes were laws that were established to regulate the lives of former slaves. Restricting their further activity and ensure they are available for labor since slavery has been abolished at the time. Many states had freed blacks sign a yearly labor contract with their signature, basically stating they agree to being available for labor. If they did not agree with the contract, they risked being placed in jail and/or being fined and forced to work for free (unpaid labor).
There was three laws.
The Apprentice Law
The Vagrancy Law
The Penal Code
Mississippi and South Carolina were the first states to activate the black codes. Each had different laws for the freed blacks, Mississippi had freed blacks show a written evidence of employment each January, and South Carolina had a law that required freed blacks to only hold a job as a servant or farmer unless paying the annual tax between ten and one-hundred dollars. These
The Apprentice Law stood for freedmen, free Negroes, and mulattoes under the age of 18, to apprentice said minors to a competent and suitable person if they have a particular care to the interest to the minor.
The Vagrancy Law stood for beggars, rogues, vagabonds, idle and dissipated persons, who basically neglected supporting their families and dependents through neglecting lawful business and/or misspending time playing unlawful games (gaming houses, tippling shoes, etc.).
The Penal Code stood for freedmen, free Negroes, or mulatto not in the military service and not licensed to do so by the police of their country, shall keep or even carry any firearms, whether it be ammunition, dirk, bowie knifes, etc.., is also prohibited to be carried.