Apple - How to transmit my PC onto my iMac?
You cannot transmit the output of your Windows screen through an iMac display, but there is one way to work that you may find quite appealing: Microsoft Remote Desktop.
MS has a remote desktop client application that is a free download from the App Store. On your Windows machine, you change System preferences in Control Panel to enable remote access. In the Remote Desktop app on your iMac, you create a machine profile that specifies the Windows computer name or IP address, your account username and your password. It supports fullscreen mode, so your Windows login will be plenty big on your 27" display.
I use the application daily to remotely administer Windows desktops and servers all over the country. From the comfort of my MacBook.
Depending on the model of your iMac, you can use the mini-display port as an INPUT and change the imac into monitor mode to use it as an external display.
This IS compatible with any Operating System, as long as the graphics adapter can support the resolutions that the iMac can support.
This feature is called Target Display Mode, and can be accessed by pressing COMMAND-F2 on your keyboard once the cable is connected.
Here is Apple's notes about it: http://support.apple.com/kb/HT3924
I use one of these to connect to my gaming PC, connected to a DVI cable. http://store.apple.com/us/product/MB570Z/B/mini-displayport-to-dvi-adapter
Good luck!
Ed
I would suggest that you go with Trane Francks' answer to use Microsoft Remote Desktop. RDC is one of the crown jewels of Microsoft. It is so much better that VNC. I wish my Mac's and Linux systems had RDC. (Well, Linux does have X11, which is close.) Using RDC over a fast local network will feel almost like being directly on the computer. You may not even notice if you are running Office type applications. The only exception is things like video and games, but even here I have been often surprised at how well RDC works.
However to directly answer your question, a 27" iMac can be used as an external screen, but only with other Thunderbolt systems which limits this mostly to other Mac's. A HDMI to Thunderbolt converter will not work. (Unless, someone has recently created a much smarter adaptor.) Apple calls this "Target Display Mode" which is only available on 27" iMac's. Pre-Thunderbolt systems used Mini DisplayPort and were much easier to use with other systems.
A great explanation: http://www.tekrevue.com/tip/ins-outs-imacs-target-display-mode/
And Apple's own docs: http://support.apple.com/kb/HT3924?viewlocale=en_US&locale=en_US