You can define classes anywhere you want to, and even if there are "good practices" it never is so simple as "this is the best solution in any project". At the end the only right answer that always work is "it depends", since what is better also depends on a lot of stuff. In this case PongThread is inteded to be used only inside PongTimeView, so for the writer the best place to put that code was inside PongTimeView.
About getHolder... That's not an Android weird thing, you can call methods without specifing the object in java. In this case, "getHolder" is a method of SurfaceView, a class from the Android API:http://developer.android.com/reference/android/view/SurfaceView.html#getHolder%28%29
Since PongTimeView extends SurfaceView, that line is calling the getHolder() method of the PongTimeView object that was inherited from SurfaceView. If you write a call to a function without specifying and object, the compiler always uses this rule:
1 - If "this" has a method that matches that call (considering also inherited methods), the line is interpreted as this.method(). If not...
2 - If the class has a static method that matches, the line is interpreted as Class.method().
If those checks fail the code doesn't compile. In Java you don't have global functions, you have static methods on classes, but to access a static method from another class you must import that class and write NameOfThatClass.method().