  JOREK is a massively parallel fully implicit non-linear extended MHD code for
realistic tokamak X-point plasmas. It has become a widely used versatile code
for studying large-scale plasma instabilities and their control developed in an
international community. This article gives a comprehensive overview of the
physics models implemented, numerical methods applied for solving the equations
and physics studies performed with the code. A dedicated section highlights
some of the verification work done for the code. A hierarchy of different
physics models is available including a free boundary and resistive wall
extension and hybrid kinetic-fluid models. The code allows for flux-surface
aligned iso-parametric finite element grids in single and double X-point
plasmas which can be extended to the true physical walls and uses a robust
fully implicit time stepping. Particular focus is laid on plasma edge and
scrape-off layer (SOL) physics as well as disruption related phenomena. Among
the key results obtained with JOREK regarding plasma edge and SOL, are deep
insights into the dynamics of edge localized modes (ELMs), ELM cycles, and ELM
control by resonant magnetic perturbations, pellet injection, as well as by
vertical magnetic kicks. Also ELM free regimes, detachment physics, the
generation and transport of impurities during an ELM, and electrostatic
turbulence in the pedestal region are investigated. Regarding disruptions, the
focus is on the dynamics of the thermal quench and current quench triggered by
massive gas injection (MGI) and shattered pellet injection (SPI), runaway
electron (RE) dynamics as well as the RE interaction with MHD modes, and
vertical displacement events (VDEs). Also the seeding and suppression of
tearing modes (TMs), the dynamics of naturally occurring thermal quenches
triggered by locked modes, and radiative collapses are being studied.
