Constructor driver

Hey,

I saw in example Appiumcode the following

In the BaseClass

public BasePage(WebDriver driver) {
this.driver = driver;
}
and in a test class

public LoginPage(WebDriver driver) {
super(driver);
}
Can someone explain in simple words what this exactly does ?

http://www.seleniumeasy.com/selenium-tutorials/simple-page-object-model-framework-example