Now I want a rainbow drink too!
As Sokyuu said though it's just fluid densities (edit: see below). It's being poured from a mixer, but I guarantee that the mixer was never actually shaken up or otherwise mix anything. Each color of liquor would have been poured in carefullyand allowed to settle into nice layers first(I was wrong, you don't let them settle, see below!). And of course others have posted how-to videos as well.
Edit: now after watching the video it made me realize that pouring it immediately is also very important. Blue Curaçao is actually the heaviest thing added but is added last on top and if you didn't pour right away it would all sink to the bottom and it would pour out as yellow, red, blue. You're actually depending on it sinking so that it mixes with the pineapple juice to make the green in the middle.
That's probably actually true of the pineapple juice and grenadine too, and the point of adding the ice is to create a buffer and slow the mixing process.