The doctor creates keyframes for the teeth they want to move, with each keyframe storing the position and rotation of the tooth at a specific point in the animation. As the doctor moves the tooth over time, multiple keyframes are created to capture the movement, ensuring precise control over the animation process. These keyframes can be created, deleted, and moved along the timeline by the doctor, allowing for flexibility and adjustments as needed. This process enables the doctor to accurately animate the teeth to their final positions.