Gamma-ray bursts (GRBs) are brief and extremely powerful cosmic explosions. They are thought to result from the collapse of massive stars or the merging of neutron stars in distant galaxies. They commence with an initial, very bright flash, called the prompt emission, with a duration ranging from a fraction of a second to hundreds of seconds. The prompt emission is accompanied by the so-called afterglow, a less brighter but longer-lasting emission over a broad range of wavelengths that fades with time. The first GRB detected by the MAGIC telescopes, known as GRB 190114C, reveals for the first time the highest energy photons measured from these objects. On January 14, 2019, after an external alert triggered by Swift and Fermi, the MAGIC telescopes detected for the first time in history, the most energetic component of a GRB. This discovery provide the first unambiguous detection of teraelectronvolt (TeV) photons from a GRB. The TeV emission detected by MAGIC is due to an additional component which appears during the afterglow: the gamma rays discovered by MAGIC are generated by an Inverse Compton mechanism, a process which differs from the synchrotron radiation which generates the emission seen at larger wavelengths. The discovery of gamma-ray emission from GRB 190114C in the new, TeV window of the electromagnetic spectrum shows that the GRB explosions are even more powerful than thought before. The wealth of new data on GRB 190114C acquired by MAGIC and the extensive MWL follow-up observations now offer important clues to unravel some of the mysteries concerning the physical processes at work in GRBs.