BBCode is the way you format posts on the site. It was originally created many, many years back for old-style forums, and it's stuck since – and we use it as we were originally a forum. It turns [b]bold text[/b] into bold text, or [i]italic text[/i] into italic text, for example.
Most of the time, the BBCode is hidden behind our post editor, so you just click the buttons and it sorts all the code out for you – but some functions are still done exclusively with BBCode, such as the quotes and spoiler tags. That's why when you insert a spoiler, you have to type the stuff you want inside it between [spoiler] and [/spoiler].