See page 32 of the Rhino book. Sometimes it just performs an invisible computation and returns the result. For methods that return something, you almost always want to store the result in a variable. Comments are not executed. They allow you to explain in words what the program is doing.
Comments are only useful if they are at the right level of detail.
Standalone script live between script tags and get executed when the HTML interpreter gets to them. Event handlers appear as values for attributes of various tags, and get executed when the corresponding event occurs. When you define a function, the statements inside are not executed. Later, you invoke the function, and the statements inside execute. A common structure is to define functions in standalone script and then invoke them in event handlers.