Scraping a chalkboard (also known as a blackboard) with the fingernails produces a sound and feeling which most people find extremely irritating. The basis of the innate reaction to the sound has been studied in the field of psychoacoustics (the branch of psychology concerned with the perception of sound and its physiological effects).
The primate heritage hypothesis
One explanation for the adverse reaction is that the awful sound is similar to the warning call of a primate, back in prehistoric times. However, a study using Cotton-top tamarins, New World monkeys, found that they react similarly to both high-pitched sounds similar to fingernails on chalkboard, and to amplitude-matched white noise. In contrast, humans are less averse to the white noise than to scraping.
A 1986 study used a tape-recording of a three-pronged garden tool similar to a fork being "grided" across a chalkboard, which roughly reproduces the sound of fingernails on chalkboard. The recording was then manipulated, removing pitches at the extremities and the median. The results were then played back. It was determined that the median pitches are in fact the primary cause of the adverse reaction, not the highest pitches as previously thought. The authors hypothesized that it was due to predation early in human evolution; the sound bore some resemblances to the alarm call of macaque monkeys, or it may have been similar to the call of some predator.
The physical hypothesis
A 2011 study by musicologists Michael Oehler and Christoph Reuter led its authors to hypothesize that the unpleasantness of the sound is caused by acoustic resonance due to the shape of the human ear canal which amplifies certain frequencies, especially those in the range of 2000 to 4000 Hz (the median pitches mentioned above), at such a level that the sound would trigger pain in human ears.
Source: Chalkboard Scraping