To commit is to fully dedicate yourself to something. To commit yourself to being the coolest kid on the beach means spending hours at the mall trying on trunks and flip-flops.
Commit can also mean "perform an act" — often the kind that can get you in trouble. Just ask anyone who's committed theft, or arson, or vandalism. If you are committing another person, that means you are sending that person to an institution. Someone may be committed to prison, or to a psychiatric hospital for treatment.