driver.close():
It’s a command by which the current window can be closed. For example, if we have multiple browser windows open then, by using this command we can close the window with which the focus is.
driver.quit():
This command closes all the browser windows which are open. For example, if we have multiple browser windows open then, this command can close all the windows at once.