What does echo ^[[r do?

I tried echo ^[[r and it takes the cursor to first line in the telnet window...
and echo ^[[32m changes font color to green .... Also echo ^[[00ff takes cursor to first command line in the current window (Note : ^ is entered as Ctrl + V and first [ as Escape character)

Wud like to know how shell interprets these commands ?? and what the arguments r, 32m , 00ff etc stand for ?? And is there any other potential impact if we use these commands in a shell script ??

Thanks in advance,

Salim

The shell does not interpet them, the terminal/terminal emulator does.

You have already described the impact: the cursor moves and the color changes.

The effects are related to your terminal type; escape sequences won't work with all terminals.

Thomas