How is AMP "recharged" to become ATP in a cell?
AMP is first converted to ADP in the reaction

AMP + ATP $\leftrightarrow$ 2 ADP

catalyzed by adenylate kinase. So one phophate group is transfered from ATP to AMP, resulting in two ADP molecules. The ADP formed is then used to synthesize ATP as usual, by the mitochondrial ATP synthase or by the glycolysis enzymes.

For other nucleotides and deoxynucleotides, the monophosphate form NMP are usually phosphorylated to NDP using ATP, catalyzed by various kinases. For example, UMP and CMP is handled by the enzyme CMPK. Note that this is essentially the same type of reaction as adenylate kinase.

Regarding the energetics, the above reaction is only slightly favorable (at equal reactant concentrations) with $\Delta G=-2.6$ kJ/mol. In most cells, ATP concentration is much higher than ADP though, which helps drive the adenylate kinase reaction forward. See this site where you can investigate the energetics more closely.