WebDriver driver = new FirefoxDriver();

Here in this, WebDriver driver = new FirefoxDriver();
An instance of FirefoxDriver class has been created and the address of that instance has been stored in the WebDriver type driver variable. As soon as ‘new’ keyword create the instance in the heap area while execution it will open the firefox browser with default setting.
As well as FirefoxDriver class will implement all the methods of WebDriver interface.

 

Source: http://selenium-makeiteasy.blogspot.com