Currently many phones have accelerometers that can be used for determining pitch, roll and yaw. The newest phones have a “gyroscope”, which is like the accelerometers, but are better at determining the acceleration of your phone, but also provide other
For an explanation of what a solid state gyroscope does, take a look at the IEEE paper at:
The article was written in 2003, but gives a fairly accurate picture of the way a “solid state” gyro works and it is brief.
If you want to go through the process of using a gyro chip in an embedded system, you would want to take a look at the Accelerometer and Gyro Tutorial:
Learn what a Kalman filter is (this is an important piece of knowledge for working with gyroscopes):