Hey Manju, Marionette driver is the new driver that is included with Firefox. This driver has it's own protocol which is not directly compatible with the Selenium/WebDriver protocol. Up to version 47, the driver used to automate Firefox was an extension included with each client. The Gecko driver is an application server implementing the Selenium/WebDriver protocol. It translates the Selenium commands and forwards them to the Marionette driver.
Marionette driver uses the remote protocol of Firefox which can control the UI. It accepts requests and executes them in Gecko. It also have a client. The client sends instructions to the server and the server executes the instructions within the browser. You can create a Firefox driver instance with Marionette capabilities like this:
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability(“marionette”, true);
WebDriver driver = new FirefoxDriver(capabilities);
Or you can also use FirefoxOptions:
FirefoxOptions options = new FirefoxOptions().setLegacy(true);
WebDriver driver = new FirefoxDriver(options);
WebDriver driver = new RemoteWebDriver(remoteUrl, options.toDesiredCapabilities());