Create custom markup to use in posts?

You are probably looking for The Shortcode API that allows to create shortcodes like [my_shortcode] and [my_shortcode]some text[/my_shortcode] to be used in content and other shortcode-enabled areas.

More advanced technique are way more involved and might require storing editable and rendered representation of content separately or do apply custom rendering filter every time content is displayed.