It depends. If a new user is spamming, they are banned without warning as it's clear they have come here to spam.
If you violate the rules then you are given an infraction, which is a warning. An infraction gives you a certain number of points and you are banned permanently if you reach 10. Different violations get you different amounts of points.
Say that you make a personal attack, you might get a 1 point infraction. If you hit 5 I think, you get a temporary ban. The points can expire too.
To put your mind at ease, you won't be permanently banned without good reason.