  The collapsar model was proposed to explain the long-duration gamma-ray
bursts (GRBs), while the short GRBs are associated with the mergers of compact
objects. In the first case, mainly the energetics of the events is consistent
with the proposed progenitor models, while the duration, time variability, as
well as the afterglow emission may shed some light on the detailed properties
of the collapsing massive stars. In the latter case, the recent discovery of
the binary neutron star (NS-NS) merger in the gravitational wave observation
made by LIGO (GW170817), and the detection of associated electromagnetic
counterparts, for the first time gave a direct proof of the NS-NS merger being
a progenitor of a short GRB.
  In general, all GRBs are believed to be powered by accretion through a
rotationally supported torus, or by fast rotation of a compact object. For long
ones, the rotation of the progenitor star is a key property in order to support
accretion over relatively long activity periods, and also to sustain the
rotation of the black hole itself. The latter is responsible for ejection of
the relativistic jets, which are powered due to the extraction of the BH
rotational energy, mitigated by the accretion torus and magnetic fields. The
jets must break through the stellar envelope though, which poses a question on
the efficiency of this process. Similar mechanisms of powering the jet ejection
may act in short GRBs, which in this case may freely propagate through the
interstellar medium. The power of the jets launched from the rotating black
hole is at first associated mostly with the magnetic Poynting flux, and then at
large distances it is transferred to the kinetic and finally radiative energy
of the expanding shells.
