  The hard X-ray emission from magnetars and other isolated neutron stars
remains under-explored. An instrument with higher sensitivity to hard X-rays is
critical to understanding the physics of neutron star magnetospheres and also
the relationship between magnetars and Fast Radio Bursts (FRBs). High
sensitivity to hard X-rays is required to determine the number of magnetars
with hard X-ray tails, and to track transient non-thermal emission from these
sources for years post-outburst. This sensitivity would also enable previously
impossible studies of the faint non-thermal emission from middle-aged
rotation-powered pulsars (RPPs), and detailed phase-resolved spectroscopic
studies of younger, bright RPPs. The High Energy X-ray Probe (HEX-P) is a
probe-class mission concept that will combine high spatial resolution X-ray
imaging ($<5$ arcsec half-power diameter (HPD) at 0.2--25 keV) and broad
spectral coverage (0.2--80 keV) with a sensitivity superior to current
facilities (including XMM-Newton and NuSTAR). HEX-P has the required timing
resolution to perform follow-up observations of sources identified by other
facilities and positively identify candidate pulsating neutron stars. Here we
discuss how HEX-P is ideally suited to address important questions about the
physics of magnetars and other isolated neutron stars.
