Not sure exactly where you are getting hung up, but I'll give a shot at giving you an overview of how this code is supposed to work, starting with the term you listed.
lastPosition in this script is being declared as a local variable at the top of the script, along with lineText. Variables are declared by the programmer, they will not be found in the dictionary

The 'mouseDown' handler is supplying the initial values to the two local variables.
mouseMove is a message that fires as long as the mouse is moving. during that period, it looks at the 2 variables, and updates the lines in the field by adding and deleting carriage returns (cr).
To see what values he is taking and putting into the variables, open the message box, move the cursor over a field of text, and type in mouseLine. You should see something like this -

The code in the mouseMove handler in the second if / then loop is saying that (in the case of the picture) if word 2 (the number 5) equals the number of lines in the field, and there is no carriage return, then add one (so the line can continue being dragged down).
Hopefully, that was of some help to you.