So, you can never get out more energy than you put in. The principle of hydraulics is based on Pascal's law which states that a confined liquid that has a pressure place on it will act with equal force on equal areas at right angles to the area. The key words here are equal area. If I change the area I change the forces produced. Well, let's have a look at the definition of work.
Work is defined as a force over distance.
I have sacrificed distance to increase my ability to take 10 lbs of force to move 100 lbs of force. This is the same principle of a simple lever. Now, due to losses of friction and heat, I will not exactly get 100 inch-lbs of work out at the other end, so the distance I moved that 100 lbs is now even less. Hydraulics and pneumatics are great sources for transferring energy to different locations. At your local gas station for instance they might have three of four hydraulic lifts for raising cars, but they will need only one pump to work the four lifts instead of needing 4 pumps for 4 lifts.