Following a double neutron star merger, a relativistic jet propagates and interacts with the outflowing ejecta that surrounds the merger. As a result, matter is pushed around the jet to form a hot cocoon which applies pressure on the jet and potentially collimates it. After the jet breaks out from the merger ejecta, the cocoon expands and emits radiation over large angles throughout the entire electromagnetic spectrum. I will first discuss the evolution of the jet-cocoon system inside the ejecta. Then I will present the different emission mechanisms of the jet+cocoon system, from the first seconds to years later, and how they compare with the set of observables in GW170817. I will conclude with what we expect from future events and what the jet-cocoon emission can tell us about neutron star mergers and beyond.