There are any number of hydraulic door closer designs and they vary by make and model. There are ones that have swinging arms, and others that are simply a long shaft attached to two points. The main thing they have in common is that when you open them, you create a vacuum that will pull the main connector arm in and back into a prone position. Fortunately, these hydraulic mechanisms are quite easy to repair and troubleshoot with just a few simple maintenance steps.
Step 1 - Check the Hydraulic Arm
The first thing that can go wrong on a hydraulic door closer is the actual control arm. It can get bent if you have a top mounted unit, or the inside bar on straight units can get rusty and not hold the vacuum any longer.
Check this arm first to see if it moves freely without effort; if it does then you will check the air pressure screw in the following steps. If the arm is frozen and is not moving, it can be caused by this pressure screw being too tight or from lack of lubrication or obstruction. Make sure that the arm has not gotten snagged on something; a screw sticking up or another solid object might be impairing its movement. For sliding shaft types, it could simply be that the catch is in the locked position and not allowing it to close. Move this and it should function properly. If the arm is rusty, apply some lubricant. Higher quality top arm units generally have a valve that a grease gun can be hooked to for adding lube.
Step 2 - Check the Air Pressure Release Valve
On all hydraulic door closer units there is a tiny screw located in the back to adjust the amount of incoming or released air pressure. Try and adjust this to check for functionality. If this does not free up the movement of the arm, then it has likely seized and will have to be replaced.
In a case where you remove the unit and it does not allow the arm to move in or out, then you may want to try and free it up with rust remover before applying lubrication. Some times these simply get stuck from prolonged exposure to outside elements, which will cause it to seize up. You can generally work this out by dismounting the device and working its joints with lubrication until it moves freely again.
Step 3 - Check the Arm for Snags or Hitches
Look at the hydraulic door closer and make sure that there is nothing obstructing the movement of the unit. It does not take much interference to cause the unit to fail, as it is driven on air pressure and a gravity pull system. You can remove the unit and test it off the door to ensure that all the parts are moving properly. If lubrication and removal of rust does not fix the problem, then it is likely there is inside damage to the chamber and it will have to be replaced.