When you break school rules about gum chewing, you commit an infraction. An infraction is a petty crime or a minor breaking of rules.
When you think of the word infraction, think that your offence has just crossed the line into wrong. Something like a parking ticket is an infraction. When you commit an infraction, you're not knee deep in wrong, you've just dipped your toe into wrong to see what it feels like. A misdemeanor is a more serious crime such as theft, and murder is considered a felony, the most serious of crimes.