We present a comprehensive study on the dynamics of transitions between stable mode-locking and instabilities with soliton explosions or noise-like emissions depending on all of the effective parameters of the fiber laser cavity mode-locked by a nonlinear amplifying loop mirror (NALM). By numerically solving a generalized nonlinear Schrodinger equation, the spectral and temporal shapes of the pulses during the different roundtrips are calculated and the event of soliton explosions is investigated by tuning the characteristics of components of the cavity, such as those in the main loop, including filter bandwidth, length of passive fiber, rate of output coupling, and pump power, and also the components of the NALM, such as pump power, passive fiber length, and the coupling rate of this loop to the main loop. The results indicate how one can convert an unstable state with the soliton explosions to a long-term stable mode-locking state by tuning each parameter and adjusting the nonlinear phase difference of clockwise and counterclockwise waves in the NALM.