The most common problems that cause this are:
1) Echo cancellation / ambient noise cancellation is on and causes a delay
2) Input device or software used to deliver the sound signal (for example soundcard, VST) have latencies
To fix this in windows 7:
Press "start" button and type "sound" in to the search bar
Click on "sound"
Double click on your recording device
Go to "enhancements" and unbox "noise suppression" and "acoustic echo cancellation"