A heat pump moves heat from outdoors to indoors. The outdoor heat lost is ignored in the efficiency calculation (as it should be), and thus the efficiency question is how many watt hours of electricity does it take to move a watt hour of heat (joules) from outside to inside. Depending on the temperatures involved, it's usually a multiple, for example, 1 wH of electricity moves 4 wH equivalent of heat indoors, ie: 400% efficient.
If you consider the whole system, much of the electricity for a heat pump may come from burning natural gas elsewhere, which involves losses along the way. This is still usually better than 100% overall efficiency.
Direct natural gas heating is less than 100% efficient too. Most furnace systems are about 20% loss in exhaust, though they can be much better. This is still usually better than burning the gas at a plant, converting to electricity and then heating with resistive electrical in your home.