It is pumped either into sewage tankers which then pump it into sewage treatment plants or in a few cases it is pumped directly into a sewage treatment plant.
If you have ever been on a cruise you will notice that there are different tankers along side the ship at almost every stop.
No ship is allowed to dump untreated sewage or garbage into the ocean. Those kinds of things went out with sailing ships and peg leg crews.
I have a hard time imagining what 4,000 or so people dumping waste directly into the sea would look like but I imagine it would kind of kill the whole cruise ship experience for everyone.