To violate a law, rule, or agreement means to break it.
I was given a ticket because the policeman said I violated a traffic law.
Example picture