How to stop windows from sliding down?
The counter balance is not working correctly, but repairing this or replacing it is non-trivial.  Instead, you can pickup a device like this that will create enough friction to hold the window in place.  It should be installed between the window and the frame and is a simple DIY job.

http://www.lowes.com/pd_128860-76018-F+2537_0__?productId=3010767