ESTA and the 90-day limit for visits to the United States

The ESTA (Electronic System for Travel Authorization) was conceived as part of the Visa Waiver Program, a program introduced by the American government authorities, which applied to citizens of certain countries, allows them to enter the United States without the obligation to obtain a standard American visa. The main condition of the ESTA is characterized by the fact that the traveler cannot exceed 90 days of stay in the territory and that the reasons for the trip must be related to tourism or for commercial purposes (not including work).
The Visa Waiver Program has made travel to the United States considerably easier for Italian citizens by significantly reducing the amount of paperwork and processing time for a traditional visa; the ESTA is approved and delivered within 48 hours. However, it is important to understand exactly what the limits are in terms of the 90-day validity of the ESTA.
Exceed the 90 days provided by ESTA
First of all, it is good to clarify the two time periods associated with the ESTA. The document itself is valid for 2 years from the moment of receipt (unless the passport used for the request expires earlier), however it is not possible to exceed 90 consecutive days of stay during these 2 years. If you want to stay longer in America, you must apply for the appropriate USA visa.
For travelers looking to stay in the United States for this period of time, it is easy to interpret the 90 days as approximately 3 months; this causes some people to book the return flight exactly 3 months after the outbound flight. It's an easy mistake to make. For example, if you book round-trip flights, between July 4th and October 4th, then the 90-day threshold would be exceeded.
If this mistake is made, and it is realized, the solution is to reorganize the return flight in order to respect the conditions set by ESTA. Such a mistake, i.e., exceeding 90 days, will not prevent you from returning home, but it will likely cause complications the next time you apply for entry to the United States. Being the electronic process, every single note, including exceeding the stay limit of even one day, is recorded and associated with the passport number and name.
Crossing the border and coming back
Often many of the people who tend to stay in the United States for an extended period of time try to bypass the 90-day period per trip, and to avoid the hassle of the bureaucracy of a visa, apply for a simple ESTA and try to cross the border (Canada or Mexico, for example) close to 90 days, thinking of resetting them so as to start over for another three months.
That will not work. Border patrol officers are very aware of the misuse of the ESTA and the 90-day timer is not reset when crossing a nearby border. If you wish to stay in the United States for more than 90 days, do research on the type of visa (for example you can opt for the B2 tourist visa) you need and follow the formal procedures.
How long to stay out of the US before returning?
The significance of the 2-year ESTA validity is that during this period you can practically return to the US as many times as you want, as long as you never exceed the 90-day period. However, you must have a good reason for returning, as you will have to explain the reasons to the border agents when you return to the United States. Officials are very experienced in understanding the misuse of ESTA and in identifying those people who cross the border just to be able to extend theirs. Without a valid reason to return to the United States shortly after exiting, entry to the United States is very likely to be refused. However, if there are justified reasons for frequent returns (work arrangements, for example), there should be no problem, as long as you can prove it.
Essentially, the ESTA was designed to reduce bureaucratic complications and facilitate travel for citizens of certain countries (exactly 39). This is an extremely efficient and useful measure, and it is understandable that US authorities must ensure that it is used correctly. The ESTA USA application takes a few minutes and the authorization is granted in about 24/48 hours.
Have a good trip!