At present, pumped-storage power technology is the only available and effective way for the load balancing and energy storage in the grid network scale. During the frequent switch back and forth conditions, there are severe pressure pulsation and cavitation in pump-turbines. However, their generation mechanism has not been determined yet. This work contributes to the numerical simulation of the transient behaviors in a prototype pump-turbine during the load rejection process with special emphasis on cavitation effect. In this study, the two-dimensional dynamic remesh and variable speed slide mesh methodologies were employed to perform the simulation of the transient single-phase flow and cavitation flow in a pump-turbine. The simulation results of single-phase flow and cavitation flow were both consistent with the experimental data except in local regions based on the experimental validation of prototype tests. However, the numerical results considering cavitation effects have a better behavior than those of single-phase flow in the predictions of pressure pulsation and rotational speed. Then, the cavitation flow simulation results were analyzed deeply, especially in pressure pulsation and cavitation flow field. Analysis revealed that three typical complex frequency components of pressure were captured in the cavitation flow, which significantly affect the axial hydraulic thrust on the runner. And it is validated that they are primarily induced by the cavity collapse near the trailing edges of the runner blades in reverse pump mode and the interaction between cavitation and vortex rope in draft-tube in turbine mode.