Different wikis have different policies for banning users. Typically users are banned for personal attacks, spamming, legal threats, chronic vandalism, or other forms of disruption.
A ban is sometimes enforced by a block, a technical measure which prevents a particular user, IP address, or range of IP addresses from editing pages. Note that bans and blocks are not synonymous: a ban is the result of a formal decision or substantial community consensus, and generally results from a pattern of misbehavior, whereas any administrator can enact a block for simple vandalism or other clear violations.
Banned users wishing to rejoin the community should go about the appeal methods usually set down in their ban decree. If such a condition is absent, one can usually take the issue (on a Wikimedia-run Wiki) to one of the mailing lists, Jimbo Wales himself, or possibly IRC.
Contributions of banned users
Different wikis have different policies concerning contributions of banned users. The English Wikisource has a policy allowing deletion of "content created and edited solely by a banned user after they were banned, where there is possibility of bad faith. Good contributions by a banned user should be accepted, but where bad faith is possible it should be assumed." The English Wikipedia has a policy allowing deletion of pages "created by banned or blocked users in violation of their ban or block, and which have no substantial edits by others. G5 should not be applied to transcluded templates." Wikiquote has no such policy, and nor does Wikibooks or Wiktionary.