Acceleration is measured by using an accelerometer, an electromechanical device that measures acceleration forces. Dimension Engineering explains that these forces can be static, such as those caused by gravity, or dynamic, as in those that cause motion.
Accelerometers can work in a variety of ways, but the two main types work through piezoelectricity, or capacitance. Piezoelectric material generates an electrical charge when a pressure is applied to it. When a vibration or change in motion (acceleration) occurs, a mass in the accelerometer will apply a pressure to the piezoelectric material proportional to the acceleration; thus, the piezoelectric material will generate an electric charge proportional to the acceleration. Since accelerometers are typically calibrated, the measured output charge can easily be corresponded to an acceleration.
Another way accelerometers can work is through capacitance. According to Wikipedia, capacitance occurs when two conducting materials are separated by a non-conducting material, like air, and the distance between them determines the amount of capacitance that is available. If the two conducting materials move apart due to acceleration, then the capacitance between them changes. By introducing circuitry, it is possible to convert from capacitance to a measurable voltage, which corresponds to an acceleration as with a piezoelectric accelerometer.