ESTA is an automated system that determines the eligibility of visitors to travel to the U.S. under the Visa Waiver Program (VWP). Authorization via ESTA does not determine whether a traveler is admissible to the United States. U.S. Customs and Border Protection officers determine admissibility upon travelers’ arrival. The ESTA application collects biographic information and answers to VWP eligibility questions. ESTA applications may be submitted at any time prior to travel, though it is recommended that travelers apply as soon as they begin preparing travel plans or prior to purchasing airline tickets.
ESTA questions answered here - ESTA Q & As