If you are trying to get warmer your teeth may begin to chatter. The teeth's chattering is involuntary and is due to the muscles of your face contracting to generate heat to keep your head warm. So basically, our teeth chatter because when the brain realizes you're cold it will send a signal to your muscles to start moving to produce heat. The brain - the hypothalamus, to be more specific, monitors your temperature and does what it's got to do to keep you at 98.6.
So, when your teeth chatter, your teeth aren't the ones that are in control. Your facial muscles are being stimulated by your sympathetic nervous system to quiver or create heat. This is the body's natural mechanism to create heat (as the muscles quiver this creates friction in-between the muscle cells, thus causing heat).