The cyan arm is connected to a cam (eccentric circle profile) that contacts with rollers of two pistons. The red piston has green spring that accumulates energy during door opening (the spring length is reduced) and releases it during closing. The orange piston has a blue spring that ensures its permanent contact with the cam. The cam must be arranged in such a way as to avoid self-locking during closing.
The spaces around the pistons contain oil. There are oil ways connecting the oil spaces including adjustment valves that regulate opening and closing speeds.
As the door swings closed, connecting link (in orange) comes into toogle with the cyan arm, giving it a large angular velocity, which helps the oil damping be more effective in retarding motion near the closed position.