The control board senses the motor current and when it sees it increase as it reaches the end of travel or is stopped by an obstruction, cuts voltage to motor.
Extending into a curb or something similar won't hurt them.
Since it starts to extend and then retracts it doesn't sound like a magnetic switch issue. I would suspect the control board.
You can get a trouble shooting guide HERE
that might help. There is info on checking a lot of things including the magnetic switch and motor.