We have two modes in locking mechanism one is
1.Governance Mode: this mode helps to restrict to only set of users who can delete/overwrite and object.
2.Complaince mode: This mode is tightly configured, when activated even the root user and other users won't be able to delete or overwrite the object.
Retention Period : It is basically time period for object version. This retention data is saved as object version meta data.
If user does not wish to apply retention period or does not know the exact time period for the object version to get locked, he/she has the provision to use Legal hold option which acts similar to locking mechanism but user can remove the locking at any time.
NOTE: User should have S3 put legal policy option to enable it.