getIntent() is a member function of the Activity class. When you invoke it, the current class instance is referenced to return the Intent that activated it.
The following code elements do exactly the same thing as your example:
The second example works because your Activity is a subclass of android.app.Activity and it's that parent class that actually implements the getIntent() method. The first example is based on the idea that:
is implicitly defined by
Java's inheritance mechanism. Assuming you don't override it with some other functionality, anyway!