The conduction and switching mechanism of resistive random access memory (RRAM) is reviewed in this paper. The resistive switching in oxides is generally attributed to the conductive filament (made up of oxygen vacancies) formation and rupture in the oxide due to field assisted oxygen ion migration. As a model system for device physics study, HfOx based RRAM devices were fabricated and characterized. To identify the electron conduction mechanism, various electrical characterization techniques such as I-V measurements at various temperatures, low-frequency noise measurements, and AC conductance measurements were employed. It was suggested that the trap-assisted-tunneling is the dominant conduction mechanism. In order to explore the oxygen ion migration dynamics, pulse switching measurements were performed. An exponential voltage-time relationship was found between the switching time and the applied voltage. To obtain a first-order understanding of the variability of resistive switching, a Kinetic Monte Carlo (KMC) numerical simulator was developed. The generation/recombination/migration probabilities of oxygen vacancies and oxygen ions were calculated, and the conductive filament configuration was updated stochastically according to those probabilities. The KMC simulation can reproduce many experimental observations in the DC I-V sweep, pulse switching, endurance cycling, and retention baking, etc. The tail bits in the resistance distribution are attributed to the oxygen vacancy left over in the gap region due to a competition between the oxygen vacancy generation and recombination. To enable circuit and system development using RRAM, a compact device model was developed. The compact model, implemented in MATLAB, HSPICE, and Verilog-A, which can be employed in many commonly available circuit simulators using the SPICE engine.