In an ideal machine the work input (energy put into a machine by the operator) equals the work output (energy put out by the machine.
For simplicity, lets assume that a lever is an ideal machine. (I will discuss the effects of friction in a moment.)
Lets assume that initially the fulcrum is in the middle of the lever. That means that the distance the operator pushes down is equal to the distance the lever pushes up on some resistance or load.
Lets say the operator pushes down with 5N over a distance of 2m. Work input = F x d = 5N x 2m = 10J
Since the amount of energy available for the machine is 10 J,
work output = 10J = 5N x 2m
Now lets move the fulcrum closer to the resistance so that the lever lifts it only 1m this time and the operator has to push for 4 m. Assuming the same amount of work, the following happens:
work input = F x d
10J = 2.5 N x 4m --->work done by the operator
work output = Fx d
10J = 10N x 1m-->work done by the machine
Notice that machine multiplied the force 4 times. This is because the amount of energy available is constant and if you increase the distance the operator has to move, you decrease the amount of force required to operate.
Friction, however, in all machines must be over come. Some of the work put into a machine is lost because of this. So the work output of a machine is always less than the work input. And it might require a little more force than the calculations above show for the operator to use the machine.