This is one of the frequently asked question in interviews. The answer is very simple, in Selenium automation the waits are categorised into types Implicit Wait and Explicit Wait.
Implicit Wait: This wait applicable to all the web elements on the web application through the project once defined. If we define this wait as "15" seconds at driver instantiation level, then driver will wait for 15 seconds for any web element on the web pages.
Explicit Wait: This wait is applicable to one web element at a time based on a condition. Suppose there are two web elements say "button" and "link", button is loading after 20 seconds and link is loading after 30 seconds. So we can define Explicit wait for 20 seconds and 30 seconds using WebDriverWait respectively. And now, WebDriver waits for maximum 20 seconds for "button" and 30 seconds for "link" separately. If the given condition is met within the maximum time, WebDriver moves to the next step, it will not for maximum time period.
Implicit Wait: This wait applicable to all the web elements on the web application through the project once defined. If we define this wait as "15" seconds at driver instantiation level, then driver will wait for 15 seconds for any web element on the web pages.
Explicit Wait: This wait is applicable to one web element at a time based on a condition. Suppose there are two web elements say "button" and "link", button is loading after 20 seconds and link is loading after 30 seconds. So we can define Explicit wait for 20 seconds and 30 seconds using WebDriverWait respectively. And now, WebDriver waits for maximum 20 seconds for "button" and 30 seconds for "link" separately. If the given condition is met within the maximum time, WebDriver moves to the next step, it will not for maximum time period.