Is it possible to use an iMac's screen as a second monitor?
I don't know your iMac spec, but look at Apple knowledge base
With Target Display mode, you can use your iMac (27-inch, Mid 2010) or iMac (27-inch, Late 2009) with Mac OS X as an external display. Connect any computer or other device with a Mini DisplayPort to your 27-inch iMac using a Mini DisplayPort to Mini DisplayPort cable or using a converter that converts other electrical, video, and audio protocols from another source device to Mini DisplayPort compliant signals. (Cables and converters available separately.)
Air Display application, supports both Mac and Windows. And appears to be for free.
Seemed really promising, but after installation on an iMac with OSX 10.5.8 and a laptop with Windows 7, both computers failed to detect each other. I restarted both app's, turning on/off, restarted the Bonjour service but couldn't get it to work :-(
Easy way ScreenRecycler, but commercial - and for Macs only.
For windows - you can try search for some freeware vnc
solution.