Every instance I can think of in which someone was banned had a few key items -
1.) Whatever it was that led to the banning was at least partially them just plain "being stupid".
2.) They were warned by one or more moderators multiple times that they needed to quit doing the bannable offense.
3.) They either persisted in their action, or decided to argue (usually over more than one page's worth of posts) with the moderator about the warning.
There's a list of offenses that can get you in trouble over in the rules section of the site. Avoid these, and you'll usually be alright, although moderators can make exceptions if they feel the situation warrants it (see rule #1). In addition, if a topic drifts into a situation that violates the rules, you probably won't be banned out of hand, but will receive a warning, instead. I got involved in a Freespace vs. Wing Commander debate that arose due to topic drift, and in retrospect was getting out of hand. We received a warning, I and the other principal participant walked away from the discussion, and nothing further came of it. The key things are to 1.) avoid topics that might cross the line (mods might give you room for error if it only happens on rare occasions, but probably not if it happens all the time), and 2.) if a mod tells you to stop, then stop.