Upvote:1
If your nationality is eligible for the Visa Waiver Program (a UK passport holder would be) you'll need to apply for the ESTA before you leave. Otherwise, unless you are Canadian or Bermudan, you'll need a valid US visa.
If you're relying on the VWP and don't apply you'll likely be denied boarding to the US-bound flight.