How does the magnetic field in a servo motor acts according to the PWM signal?
Most small servos don't use magnetic fields for position sensing, they use potentiometers. Here's a good beginner's level explanation in text with a video link.

They all seem to have the same basic components – a potentiometer hooked to a voltage regulator and one shot generator, which converts position of the armature to a PWM pulse. This PWM pulse is compared to the original one sent by the microcontroller. This logic board finds the difference between the pulses, which is called the error.
The magnitude of the error is sent to a pulse stretcher and the direction of the error is send to a flip flop to be stored as a high or low. The magnitude of the error is stretched out by the pulse stretcher. Then both parts of the error are sent to the output driver, which is probably an h-bridge. Most servos are 50HZ, which means this control loop is happening 50 times every second until the error is “zero”. The dead band for the pulse stretcher sets a minimum pulse length that it will stretch. Anything below this limit is considered zero error.

The PWM signal is not aimed at the motor: it's aimed at the control circuit inside the servo, which then chooses whether to turn the motor clockwise or anticlockwise if the PWM signal differs from the position measured by the potentiometer.
(Not to be confused with: stepper motors, or the use of EMF to sense position in BLDC motors, or situations where Hall sensors are used to measure shaft position. All of those are not usually called &quot;servo&quot; motors.)