Context. The corona is highly dynamic and shows transient events on various scales in space and time. Most of these features are related to changes in the magnetic field structure or impulsive heating caused by the conversion of magnetic to thermal energy. Aims. We investigate the processes that lead to the formation, ejection and fall of a confined plasma ejection that was observed in a numerical experiment of the solar corona. By quantifying physical parameters such as mass, velocity, and orientation of the plasma ejection relative to the magnetic field, we provide a description of the nature of this particular plasma ejection. Methods. The time-dependent three-dimensional magnetohydrodynamic (3D MHD) equations are solved in a box extending from the chromosphere, which serves as a reservoir for mass and energy, to the lower corona. The plasma is heated by currents that are induced through field line braiding as a consequence of photospheric motions included in the model. Spectra of optically thin emission lines in the extreme ultraviolet range are synthesized, and magnetic field lines are traced over time. We determine the trajectory of the plasma ejection and identify anomalies in the profiles of the plasma parameters. Results. Following strong heating just above the chromosphere, the pressure rapidly increases, leading to a hydrodynamic explosion above the upper chromosphere in the low transition region. The explosion drives the plasma, which needs to follow the magnetic field lines. The ejection is then moving more or less ballistically along the loop-like field lines and eventually drops down onto the surface of the Sun. The speed of the ejection is in the range of the sound speed, well below the Alfvén velocity. Conclusions. The plasma ejection observed in a numerical experiment of the solar corona is basically a hydrodynamic phenomenon, whereas the rise of the heating rate is of magnetic nature. The granular motions in the photosphere lead (by chance) to a strong braiding of the magnetic field lines at the location of the explosion that in turn is causing strong currents which are dissipated. Future studies need to determine if this process is a ubiquitous phenomenon on the Sun on small scales. Data from the Atmospheric Imaging Assembly on the Solar Dynamics Observatory (AIA/SDO) might provide the relevant information.