ESTA period of validity
YOUR ESTA application is valid 2 years from the day you get your confirmation. Exeption: Your passport expires before these 2 years. Then you have to apply for a new ESTA application.
Within the validity of your ESTA you will not have to apply for a new one if you travel again to the USA. If the ESTA expires while you are in the US it will not affect your departure as the ESTA has only to be valid the day you arrive in the USA. The 2-year validity does not allow you to stay in the USA for two years, it only allows multiple entry within its validity for a stay of 90 days or less.