Sent to prison with hard labour - what does it mean?

When you’re sent to prison with hard labour, what exactly does that mean?

You go on a work crew- making roads, breaking rocks, etc. Not used much anymore. See the film Cool Hand Luke.

Hard labour appears to just be physical punishment.

Or harvesting agricultural products in Alabama.