Each module derives from nn.Module, while implements the __call__ 1 function. This function is called, when you can directly an object e.g. as model(x).
You can see in the linked source code that some maintenance will be performed (e.g. hooks will be called) and finally forward will be executed, which defines the actual forward pass of this module.