Like others, we start by stripping away the packaging as things come on board. It's amazing how much trash is produced from a shopping trip.
Then once underway, small food scraps go overboard, but nothing that's going to be floating around like banana peels. The regs say ground to 1" or less, and we pretty much follow that. Then trash goes through a compactor, but we make sure that only dry trash goes in there. Otherwise you end up with a soggy festering mess. We have come ashore after a month out and only had one big trash bag. I think the real key it not taking it all aboard in the first place.