[ switches the text interpreter to interpret state (you will get
an ok prompt if you type this example interactively and insert a
newline between [ and ]), so it performs the
interpretation semantics of 2 cells; this computes a number.
] switches the text interpreter back into compile state. It then
performs Literal's compilation semantics, which are to compile
this number into the current word. You can decompile the word with
see .strings to see the effect on the compiled code.

You can also optimize the 2* cells into [ 2 cells ] literal
* in this way.

Compilation: compile the string specified by c-addr1,
u into the current definition. Run-time: return
c-addr2 u describing the address and length of the
string.

You might be tempted to pass data from outside a colon definition to the
inside on the data stack. This does not work, because : puhes a
colon-sys, making stuff below unaccessible. E.g., this does not work:

5 : foo literal ; \ error: "unstructured"

Instead, you have to pass the value in some other way, e.g., through a
variable: