Eval dynamically evaluates a block of code to give a piece of text, which is fed through the parser. This gives a statement list, which is then executed.
set x = "foo";
set y = "bar";
set bar = "bat";
eval("set $x = \$$y;"); // evaluates to set foo = $bar
// foo will now be "bat"