The Drupal Markup Engine (or DME as I'll refer to it from now on) allows you to define tags for use inside of node content that do almost anything you could wish for - allowing users to do such things as to specify where images should be placed in the text, specify that certain text is a spoiler and shouldn't be easily hidden, or to safely allow users to reference video or other resources from other sites. Tags can either enclose text (like text) or not (like ).
The DME works by being a filter that can be set up with other input filters. It checks other modules looking for hook_dme_tags() hooks and asking them for tags that the module supports. Once it runs into a tag when filtering, it then calls the hook a second time with parameters from the tag, expecting the hook to return text that it replaces the original tag with. The tag processing is in the context of the node being processed, so the processing of tags can include referencing related nodes or imagefields inside of the node itself.