An accelerometer is a sensor that measures acceleration or vibrations. It detects changes in velocity and can be used to measure static (e.g., gravity) or dynamic (e.g., vibrations) acceleration in three axes: X, Y, and Z.