If I'm not mistaken, it leaves through the osculum which is a cavity located on the upper part of a sponge.
Sponges feed through a process called filtration, which means that they filter the water in search of nutrients. And after they collect everything they need from the water, they need to let it out somehow; through the osculum.
Hope it helped,
BioTeacher101