I'm not sure if you meant "piety" when you wrote "pity", so I'll give you the meaning for both.
Sin: when you do something that is wrong or considered immoral. It's usually used in a religious context, for example, many people consider it a sin to commit adultery (which is when you cheat on a romantic partner) as it goes against their religious beliefs.
Pity: usually used when you feel sympathy for someone who has had something bad happen to them. For example, "I really pity her for losing her job". It can also be used to mean "what a shame", for example, "It's a pity that the store closed so early!"
Peity: refers to an act which is religious, or other reverant behaviour. The state of being devoutly religious. For example, "The church promotes peity and virtue".
I hope that helps! Sorry if my explanations weren't too great.