The hall sensor detects a magnetic field and outputs an analog signal proportional to its magnitude.
The output of the hall sensor is converted to an ON/OFF digital signal via a comparator and then used as the rotor position signal of the brushless motor.
The hall sensor has high durability because it detects the position without contact, but it cannot be used in all environments because it is sensitive to high temperature.
High-precision and expensive encoders and resolvers are used to detect the position of the servo motor for position control. (Some of them can detect angle degrees of one millionth.)