How is energy acquired from ATP?
The basic reaction is ATP + H2O --> ADP + Pi + energy

It is the common hydrolysis of ATP, in which the nucleophilic oxygen of water attacks the electrophilic central phosphorus of the last phosphate group, resulting on its separation from the rest of the molecule (which becomes ADP).



In this image: LINK you can see more clearly the steps of the reaction. Keep in mind that the arrow 3 should be pointing to the P and not the O.

To know more about the energy and thermodynamics check this page: http://www.life.illinois.edu/crofts/bioph354/atp_hydrolysis.html

The trick here is the cells being able to utilize that freed energy to their benefit, instead of letting it disperse. This can be done, for example, by adding a phosphate group to a protein, altering its shape and consequentially its function, or by the nucleophilic attack of the first or second phosphate in the ATP molecule of a susceptible electrophilic centre, starting a reaction that could otherwise be energetically unfavourable. If the hydrolysis happens spontaneously in water without coupling it with another reaction, the freed energy will be "wasted" as heat.