The Drupal bbcode.module adds a BBCode filter to Drupal. This allows you to use HTML-like tags as an alternative to HTML itself for adding markup to your posts. BBCode is easier to use than HTML and helps to prevent malicious users from disrupting your site's formatting.
See the help screen of the module (or the code) for information on which tags and variants are supported. This implementation is not necessarily the same as the original BBCode implementation.
Note that this filter also recognizes and converts URLs and email addresses to links automatically.
The quicktags module can be used in conjunction with this module to provide a BBCode formatting bar above all text areas.