the second argument of the TextField is the string that it will show and modify by keyboard events. then you should get the returned value and put it in the same variable. as a result of this the modified variable will be shown in the next frame in the TextField control.
var s : String;
function OnGUI()
{
s = GUI.TextField (Rect(0,0,100,20),s);
}