Understanding the processes that trigger morphological transformation is central to understanding how and why the Universe transitions from being disc-dominated at early epochs to having the morphological mix that is observed today. We use Horizon-AGN, a cosmological hydrodynamical simulation, to perform a comprehensive study of the processes that drive morphological change in massive (M > 10^10 MSun) galaxies over cosmic time. We show that (1) essentially all the morphological evolution in galaxies that are spheroids at z=0 is driven by mergers with mass ratios greater than 1:10, (2) major mergers alone cannot produce todays spheroid population -- minor mergers are responsible for a third of all morphological transformation over cosmic time and are its dominant driver after z~1, (3) prograde mergers trigger milder morphological transformation than retrograde mergers -- while both types of events produce similar morphological changes at z>2, the average change due to retrograde mergers is around twice that due to their prograde counterparts at z~0, (4) remnant morphology depends strongly on the gas fraction of a merger, with gas-rich mergers routinely re-growing discs, and (5) at a given stellar mass, discs do not exhibit drastically different merger histories from spheroids -- disc survival in mergers is driven by acquisition of cold gas (via cosmological accretion and gas-rich interactions) and a preponderance of prograde mergers in their merger histories.