A door closer is the mechanism that makes a door close again by itself after it has been opened. The most common is the hydraulic type: a box with a spring and oil that is fitted at the top of the door and connected to the frame by an arm. The spring pushes the door and the oil slows the movement so that it does not slam.
It is practically a must on communal entrances, garage access doors, pool gates and shops: if the door does not close by itself, someone ends up leaving it open.
Almost all have adjusting screws for the closing speed and the final latching action. If the entrance door slams or stops short of engaging the latch, adjusting it is often enough. If it is leaking oil, it needs replacing. You will find it in door closer installation.