Door closers, as the name suggests, are meant to keep doors closed at all times. In case of fire, it prevents the fire and smoke inside the room and from leaking outdoors.
Door closers are usually installed on the fire door at the main entrance of apartments. They are not allowed to be removed at any time.
HOW TO FIX IT
If your door either closing too fast or too slow, you need to check on the speed adjusting valve located on top of the door. Slide the front cover plate and re-adjust the screw: tighten to make the door close slower, loosen to speed it up. Replace the unit if it is leaking fluid.