The pApp AcadApplication is the ComInterop library version of the autocad application. What is available in the .Net dll is the managed class object.
The code is performing a cast conversion of the managed AcadApplication object to the interop object.
Not everthing is available in the managed classes yet, so you have to use some com interop to get the job done.