How are GeckoDriver and Marionette driver related to each other and how do they work?
Marionette is the automation/control API provided by Firefox. GeckoDriver provides a WebDriver (https://www.w3.org/TR/webdriver/) compliant endpoint that then talks to Firefox via Marionette - i.e. it translates between WebDriver and Marionette.