Using iMac (2010) as a display for my PC laptop with with VGA only output (female)
You can with hardware, but it's not going to be cheap.  The main issue is going from analog (VGA) to digital; it's much easier to convert one digital format to another.  One (clunky) solution would be to chain a VGA to DVI scaler ($330) to a DVI to Mini DisplayPort converter ($150).   If you get similar products on eBay, you can get a complete solution for a little under $250.

A better solution would be with software like ScreenRecycler or one of the recommended alternatives.  This way, you're effectively remotely viewing your screen - with a fast enough computer, this works well.