These devices have a sensor that makes sure that if a child ever goes under the door while it is closing that he will not get hurt.
Many of these sensors look like the one in this picture. They are simple and straight forward. To test and make sure that your sensor that looks like this one works, simply start to close the garage door and then wave your hand in front of the sensor.
Some people have a pressure sensor. That is where the closer senses pressure as it closes and will back up if too much pressure i there (i.e. a child or pet).
Whichever sensor you have, make sure they are in good working order.