Automatic Invokation Logic?

See the Code , When Model is created with a method named Forward , how it is automatically invoked ?
class My_Mnist_Model(nn.Module):
def init(self):
super().init()
self.linear=nn.Linear(input_shape,classes)
def forward(self,xb):
xb = xb.reshape(-1, 784)
out = self.linear(xb)
return out

model=My_Mnist_Model()

How forward is automatically invoked when an argument i.e. images are passed to our model object ? we have not called it for invokation.

for image,label in train_loader:
print(label)
outputs=model(image)
break
print(outputs)