$ HfO_x $ is broadly explored as a favored material for resistive RAM (ReRAM) device applications. The microstructure, composition and phase of $ HfO_x $ all play fundamental roles in the switching mechanisms and stochasticity governing resistive RAM operations, and understanding the relation between the atomistic properties and final device behavior remains challenging. To guide the design of $ HfO_x $ -based ReRAM devices, we applied scanning transmission electron microscopy techniques to investigate the structure-property-behavior relationship during operation in situ. We developed a process to fabricate lamella devices that showed switching behavior consistent with the macroscopic state-of-the-art $ HfO_x $ ReRAM devices from which they had been cut. We then observed the compositional and structural changes taking place during switching of the device and correlated those with the electrical characteristics. We found that crystallization and grain growth occurs during repeated switching, and that the formation of crystalline regions correlates with increases in conductance. Using electron energy loss spectroscopy, we found that the grains formed during switching are more oxygen-depleted than the original amorphous phase. This hints at the role of oxygen vacancies in the conductance of these ReRAM devices. We also showed that other methods of forming crystalline regions, particularly electron beam irradiation, produce structures that are similar to the original amorphous phase or even more oxygen abundant, and do not contribute to increases in conductance. The combination of operando testing and structural and spectroscopic observation yields unique and detailed information on the processes that control switching. From the comparison of the different crystallization mechanisms, we discuss how the microstructure may be controlled to improve the cycling performance of the devices.