A seismometer is used to detect the waves of an earthquake. The idea behind a seismometer is fairly simple- it's just a weight attached to a frame. Motions of the ground cause the frame to move, and any movements of the frame relative to the weight are translated into electrical signals. Most seismometers are permanently attached to a recording device; the combination is called a seismograph.
The main condition for a seismograph to function correctly is that it needs to be in direct contact with the ground, and needs to be located in a place isolated from non-earthquake vibrations. For this reason a location far from busy roads and other sources of man made vibration is necessary. Many seismograph stations have been located in old mines, because they provide an ideal setting.