This question already has an answer here:
I'm planning to go from the UK to the States. I was wondering how the ESTA works. Is it all online, meaning when arriving in New York, will they see that I have been approved on the system when they scan my passport? Thus letting me in.