Help me understand the term transgression? I have somewhat of a rough understanding of the term. I'm almost certain that it means, committing some sort of violation. My question is, does it have to be a specific type of violation or can be any type?

Ie: I uttered an indelicate remark which offended him. He decided to no longer be my friend. 
Apparently I committed a social transgression that allowed him to form that decision