An accelerometer is a device that measures proper acceleration, the acceleration experienced relative to freefall.
Well the accelerometer inside the device help us to detect the relative position in relation with the gravity, measuring the answer of the 3 movement axis: x, y and z, so this allow the device to detect its orientation (portrait, landscape, face up or down), a shake or the relative values in specific moment in time.
And accelerometer sensor is not only used on Phone devices, also many high end cameras uses for the image stabilization; the cars to detect the vehicle acceleration; watches for runners that include footpods; the Nintendo Wii with the accessory Wii Motion Plus or the six axis control of the PS3 includes one. Well let's talk about how to get the values of this sensor in side the iPhone/iPod.