This is a very common question that we get, and there are different answers depending on the violation.
Minor Violations - These violations can be speeding, running a stop sign or red light, unsafe lane changes, basically small traffic violations will affect your insurance rates for 3 years
Accidents - At fault accidents will also affect your insurance rates for 3 years
DUI - These are costly. Not only do they increase your rates by the largest amount, they will affect your rates for 10 years. Next time you don't want to spend the money on an Uber or taxi ride, think about how much you'll spend on legal fees and insurance costs and you'll probably change your mind, not to mention the fact that driving drunk obviously puts yourself and others at risk.
Bonus Tip! Good Driver Discount - In California if you have one DUI or more than one of any other violation you will not qualify for the 20% good driver discount.