$this
in the Joomla templates (views) is refering to the JView
class.
The JView
class has a lot of standard option which it comes with, and can be found in the documentation you have given. In addition, one can add a view that extends JView
so, the method/properties there will be available in the template via $this
too.
http://docs.joomla.org/J2.5:Developing_a_MVC_Component/Adding_a_view_to_the_site_part
Following that documentation you can see how the controller renders a view, and how a custom view class can be done.
The exact answer of your question is there too:
This template file will be included by the JView class. Therefore, here, $this refers to the HelloWorldViewHelloWorld class.