If you're travelling to or through the USA on a UK passport, you'll need to register for an ESTA (Electronic System for Travel Authorisation) at least 72 hours before arrival in the USA.
An ESTA costs $21 per person is currently valid for two years so that it can cover multiple visits or transits, so long as each stay in the USA is less than 90 days.
If you don't hold a British passport, you'll need to check the entry requirements to the USA for your citizenship. You can check the USA embassy website for more details
You can find more information about ESTAs on the US Embassy website.