You will get ban by
1. Spamming - spam posts + signature campaign
2. Trolling
3. Posting viruses and malware.
4. Permabanned if you are caught using another account while your other account is currently banned.
5. Your account will get auto locked if you forget your password and use the secret word to recover your account.
you can also get banned for posting off-topic replies and insubstantial or low quality posts repeatedly. it doesn't have to be a spam.
I actually reported one of OP's post on july 4th (I assume that's when he got banned) because it doesn't make any sense with the topic.