You just have to make a lot of halfnium from some nuclei and some of the halfnium will have this higher energy spin-state spontaneously. You can seperate different spin-states using strong magnets since the amount a particle bends in a magnetic field depends on its spin. The X-rays aren't used to controlled the spin but to the kick the nucleus in to a higher-energy and less stable spin-state. The nucleus then decays into the ground state releasing a much more energetic photon than the X-ray you put in.
However, the cross-section (the probability of occurance) for this X-ray excitation is incredibly small in every isomer studied. It usually requies much more energy to be put in than can be produced. Carl Collins's data shows a much larger cross-section (10,000x larger!), but follow-up experiments by Argonne National Labs and others haven't seen a damn thing. Collins data is not very convincing to anyone, but Collins