Applying for ESTA can only be done online.
Applicants need to fill out the online application form, provide passport and personal information, answer eligibility questions, and pay the application fee by credit or debit card.
It is recommended to apply at least 72 hours before departure, and in most cases the result is available within that time.