To supply 5.1 channel surround sound, this powered speaker system requires 6 separate analog audio signals: front left & right, rear left & right, center, & sub-woofer. Unfortunately, iMacs supply only 2 channel left & right analog audio signals (through the headphone jack).
So the most straightforward connection would be to plug the green plug into the headphone jack, giving you 2 channel sound through the system's front left & right speakers. You could also use a stereo 3.5 mm splitter adaptor (essentially the same thing as a headphone "Y" cord) & plug the green & black plugs into it, but that will just give you 2 channel stereo in both the front & back speakers.
There are some limitations to either of these configurations, most notably that the small speakers are not designed to reproduce low frequency sounds very well. In a true 5.1 channel system, the lows are removed from all 5 normal channels, combined, & sent to the ".1" sub-woofer channel. There is no satisfactory way to do this with adaptors; for that you would need some kind of electronic processing. Typically, a 5.1 sound card & a computer with expansion (PCI) slots is used. Obviously, iMacs don't have PCI slots, so you can't use that solution.
Similarly, the center channel in a 5.1 surround system is not a simple combination of any of the other channels, & also requires electronic processing to extract it from the combined 5.1 digital audio signal. It is possible to mix the 2 channel analog left & right signals together to create a pseudo center channel, or to do the same to create a pseudo-sub-woofer channel, but this requires either an electronic mixer or a special adaptor, & the results are not usually worth the effort.
The ideal solution would be something like a USB equivalent of a 5.1 sound card. Unfortunately, there do not seem to be any of these available that support Macs -- I could find only one such device, marketed under several different brand names, but it requires special software drivers to support more than 2 channel sound & the included software only supports PC's, with a note that it works "best" with Windows XP, whatever that means.
I wish I had a better answer for you but perhaps one of the first two connections I mentioned will be useful to you.