It's the headlight adjuster trying to find a correct position but failing miserably.
In these cases the motor then just travels back and forth trying to find the correct point.
The position that the motor is trying to find is monitored by a very basic variable resistor.
As the motor moves, the resistance changes until it reaches the correct value.
Because the variable resistor is a cheap part it can fail, causing this problem.
Firstly you need to
Done that? OK, we shall continue. This is what you will have in your hand, the offending part.