  Compact binary mergers involving neutron stars can eject a fraction of their
mass to space. Being extremely neutron rich, this material undergoes rapid
neutron capture nucleosynthesis, and the resulting radioactivity powers fast,
short-lived electromagnetic transients known as kilonova or macronova. Such
transients are exciting probes of the most extreme physical conditions and
their observation signals the enrichment of the Universe with heavy elements.
Here we review our current understanding of the mass ejection mechanisms, the
properties of the ejecta and the resulting radioactive transients. The first
well-observed event in the aftermath of GW170817 delivered a wealth of
insights, but much of today's picture of such events is still based on a
patchwork of theoretical studies. Apart from summarizing the current
understanding, we also point out questions where no consensus has been reached
yet, and we sketch possible directions for the future research. In an appendix,
we describe a publicly available heating rate library based on the WinNet
nuclear reaction network, and we provide a simple fit formula to alleviate the
implementation in hydrodynamic simulations.
