Anyone who knows a Mormon has probably noticed that they abstain from many activities like drinking alcohol, watching R-rated movies, or doing business and going out on Sundays. Mormons, members of the Church of Jesus Christ of Latter-day Saints believe that living a certain way will help them grow closer to God. They believe that in the scriptures and through prophets, the Lord gives commandments about appropriate behavior.
God's commandments aren't exclusive to just a group of people as they are given to everyone through His prophets. However, He has high expectations for His chosen people as members of His Church and they are expected to act accordingly. Mormons keep these standards of behavior by choice; the Church does not force anyone to do (or not do) anything.
What happens when a Mormon "breaks the rules"?
For some sins, all that is needed is individual repentance, which includes changing to keep the commandments of God, praying for forgiveness, and not repeating the mistake. Sometimes when a sin is more serious, such as breaches of the law of chastity, the sin must be confessed to a Bishop. In these cases, bishops can help people to make better choices. A bishop is someone concrete that a person can check in with to help with breaking bad habits. Occasionally, for the most serious sins, there are disciplinary councils, which are also there to help people repent and become better. Sometimes, members who commit serious sins can lose certain privileges, like the ability to take the sacrament or go to the temple. This is because people must be worthy to do these things, and doing them unworthily can cause problems for that person. These privileges can be restored through repentance, even when someone loses their membership in the church. These processes are to help and protect the people who have sinned, and also to protect the Church from people who may try to give it a bad name.