A limit switch is the device that tells the motor of an automatic door or a motorised roller shutter that it has reached the end of its travel, at the top or bottom, so that it stops. Without it, the motor would keep pushing against the stop.
It can be mechanical, with stops or cams that press a switch, or electronic, when the motor itself counts the turns. On shop shutters it is usually inside the barrel motor, and on sliding gates, in the ground mounted motor, with plates on the toothed rack.
When it goes out of adjustment, the door stops too early, does not close fully or strains when it reaches the end. Adjusting it is a job for an automation technician: we do not fit or repair motors. Where we do step in is on manual shutters and their locks, in roller shutter repair.