A WordPress shortcode is a macro. Does that help? Let me start again. A WordPress shortcode is a stand-in for a snippet of programming code. You simply use the shortcode, and WordPress REPLACES it with a piece of code. Shortcodes can be used in posts and pages, but usually not in widgets or post excerpts. In WordPress, a shortcode is always surrounded by square brackets like this: [my-sample-shortcode].
The default shortcodes built into WordPress (as of 4.0) include [audio], [caption], [embed], [gallery], [video]. Additional shortcodes maybe provided by plugins and themes.
Sometimes shortcodes take parameters. For example, [audio mp3=”source.mp3″ ogg=”source.ogg” wav=”source.wav”]. Other times, they require start and end tags, like this: [caption] Isn’t this a pretty picture? [/caption].
By the time you need to remember to add the square brackets and the parameters, using a shortcode can be a lot like programming. But using shortcodes is one way of upping your WordPress game.