This is apparently something that Photoshop, CorelPainter, Krita (Linux package) and Paint Shop Pro do differently - it's called 'natural paint mixing', just like in real life painting.
Demo video showcasing Krita:
http://www.youtube.com/watch?v=lyLPZDVdQiQ
(I wish there was a way to embed YouTube videos in forum postings here, if anyone knows how to do it, please let me know, my experience so far has been that copy / paste HTML isn't rendered.)
Informative background details about color mixing in Krita here:
http://commit-digest.org/issues/2007-08-12/
Some people have created a demo of how Paint Shop Pro does it.

Also check out this forum posting about how CorelPainter does this sort of thing:
http://www.conceptart.org/forums/showthread.php?t=103786
Apparently in Photoshop it's done using layers and mixer / opacity control.

