Err, you know when you have your phone up? Like usually all phones are? That's portrait mode, now hold it like you would a gameboy/PSP, to the sides, that's landscape mode. See how what's on your phone changed? That's it
It's called an "Accelerometer". What it does is measure the forces applied to the phone, usually due to gravity but you *can* throw it off by throwing it rapidly. Keep hold of the phone if you do this, it's built fairly well but won't survive high speed impact with a wall.