I was watching a youtube video, then all of a sudden, a high pitched sound came from inside. I thought putting it to sleep was the solution, and it was. After opening it, the high pitched sound disappeared
Ah yes, a common among Intel processors. You should notice that this only occurs when the processor is idle. The anomalous sound is because the power that would be going into a occupied processor is put back in capacitance at which point the capacitors and regulators will begin to vibrate. These vibrations produce the high pitch hum that you hear. This is what I know about the subject, but if anyone else has a different explanation, I'm open to correction. I do not know how to correct it on OS X, but an effective solution on Windows is to change Power Management settings.
that high pitched sound is from the baby hamsters running inside their hamster wheel. real laptops run windows 7 and have decent core i5 or core i7 processors. macbooks, well, they have hamsters.