Add a new event, choose "System", then "On Start of layout".
Click B while selecting this event, to add a sub-event.
Add a new event, and choose "System", then "For".
The rest is easy, so I will show you the final result instead:
Try to play around with this to fully understand it :)
Say Variable1 is "word1 f word2 f word3".
First we need to know how many "word"s are in there. That's why we use tokencount().
Then we need to get each one of those "word"s in order. That's why we use "For".
"For" is like a counter, it starts from 1,2.. until it reaches our "word" count (in this case 3).
The big Action on the right of "For" takes each word (using tokenat()), surround it with [color] tags and add it to Variable2.
You will find more about tokenat() and tokencount() here. You can find more about "For" here (under the "Loop" section).