Thermal and nonthermal escape mechanisms for terrestrial bodies