This website contains the different types of punishments that slaves endured. The website discusses the reasons why slaves were punished; for example, resisting slavery, using their native language, not working hard, stealing, trying to run away or murdering a white man.
The more serious the 'crime' committed, the more severe the punishment.
The law didn't provide slaves with protection. The treatment of slaves was really bad because the owners were allowed to do whatever they wanted with their slaves, which were considered their property.