Sorting the ship's rubbish at the port
Today most rubbish on ships is incinerated (burnt). However some rubbish can be put overboard providing it has gone through a machine to grind it down into pieces less than 25mm and only dumped when the ship is far away from land, that is, more than 12 nautical miles which is about 20 km.
No plastic may be thrown into the sea from any ship, fishing vessel or even yachts and motor cruisers. This includes ships from all nations and includes the seas and oceans all over the world. There are restrictions on the disposal of all other rubbish. Ports must provide facilities for ships to dispose of their garbage, in just the same way that rubbish is collected from your house by the local council.
In Australian waters, ships may not discharge their rubbish into the sea. All ships must have a waste management plan and keep a garbage record book. All vessels, including recreational craft of 12m or more in length, must display a notice which tells people what they should do with their rubbish.
Ships at sea must treat their sewage by passing it through special machinery. They may be required to empty their sewage into a special facility in a port.