The work-energy principle says that the change in energy in a system is equal to the work done to the system. Conservation of energy means that the sum of inputs must equal the sum of outputs.
Work, in turn, is a force times a distance. That is, $W = Fd$.
So, if the sum of inputs and sum of outputs have to be equal and there's no friction, then:
$$(Fd)_{\mbox{in}} = (Fd)_{\mbox{out}}$$
So, let's talk about the lever first. Assuming both ends of the lever are rigid, motion of certain distance on the input requires motion of a certain distance on the output. How far the output moves for a particular input motion is determined by the location of the fulcrum. FYI, the study of how physical constraints determine input and output motions is called "kinematics."
So, if the input and output distances are fixed by physical constraints, and the input force is a given (you supply a force of $X$), then the only thing in the equation that can change to "balance" the input work and the output work is the output force.
That is, the output force varies as required to keep $(Fd)_{\mbox{out}}$ equal to $(Fd)_{\mbox{in}}$.
Hopefully this all makes sense so far.
A lever doesn't actually move strictly up-and-down, though. It rotates about the fulcrum. The actual distance the input traverses is $L_1\theta$, and the output moves $L_2\theta$, where $L_1$ is the length of the lever from the input side to the fulcrum, $L_2$ is the length of the lever from the output side to the fulcrum, and $\theta$ is the angle of how much the lever rotated.
Define the arc length, or distance actually traveled by the input or output end of the lever to be $s$. The input moves:
$$
s_1 = L_1\theta \\
$$
The output moves:
$$
s_2 = L_2\theta \\
$$
If you divide the output by the input, you can see that:
$$
\frac{s_2}{s_1} = \frac{L_2\theta}{L_1\theta} \\
$$
The thetas cancel, and you're left with:
$$
\frac{s_2}{s_1} = \frac{L_2}{L_1} \\
$$
which can be restated as:
$$
\boxed{s_2 = \left(\frac{L_2}{L_1}\right)s_1} \\
$$
The output distance traveled is equal to the input distance times the ratio of lever arm lengths. You can plug this back into the work equation:
$$
F_1 s_1 = F_2 s_2 \\
F_1 s_1 = F_2 \left(\frac{L_2}{L_1}\right)s_1 \\
$$
Cancel the $s_1$:
$$
F_1 = \left(\frac{L_2}{L_1}\right)F_2 \\
\boxed{F_2 = \left(\frac{L_1}{L_2}\right)F_1} \\
$$
So, these two boxed equations show that the output distance changes by $L_2/L_1$, but the output force changes by $L_1/L_2$. The output force can only go up if the output distance goes down, and vice-versa. This ability to "exchange" force for distance is referred to as "mechanical advantage."
Now, considering this, where a lever can't flip "around-the-world" because it would hit the ground or fall off the fulcrum, a pulley or gear can rotate continuously.
Where before, for the lever, the amount of output motion was dependent on the lengths of the lever arms, here the "levers" are actually gears, and their "lengths" are their radii.
That is, just like before:
$$
s_2 = \left(\frac{r_2}{r_1}\right) s_1 \\
$$
The only difference here is the change from lengths to radii. The total angular distance traversed, $s$, still keeps the same form.
So, if the output gear's radius is very large and the input gear's radius is very small, you get:
$$
s_2 = \left(\frac{\mbox{big}}{\mbox{small}}\right)s_1 \\
s_2 = \left(\mbox{really big}\right) s_1 \\
$$
So now, revisiting the work equation:
$$
W = Fd \\
$$
but, as discussed, the distance traveled isn't quite linear, it's the arc the lever takes about the fulcrum, because the lever rotates about the fulcrum. So you could say instead, that:
$$
W = Fs \\
$$
But, from the definition of arc length:
$$
s = L\theta \\
$$
so, you could substitute:
$$
W = FL\theta \\
$$
You can view or group this two ways - the first is as I did the substitutions here:
$$
W = F(L\theta) \\
$$
but, you could also group that to read:
$$
W = (FL)\theta \\
$$
What is a force times a lever arm? A torque. So you can rewrite the equation as:
$$
W = \tau \theta \\
$$
This is the analogy between linear systems and rotational systems - a force is akin to a torque, and a distance is akin to an angular span. Important to note here that $\theta$ isn't the particular angle the system is currently at, it's the angle through which the system traversed. That is, $\theta = \theta_2 - \theta_1$.
Anyways, hopefully the explanation of how the linear (lever) and rotational (pulley or gear) frames are related makes sense.
I think, more to your question, the "force multiplier" effect that you get with a lever arm, or gear, etc. is a tradeoff between applied force and applied distance.
You do the same amount of work to lift a 1000 pound rock up 1 foot as you do to lift a 1 pound rock up 1000 feet. If you don't have the strength to lift the 1000 pound rock directly, you can use mechanical advantage to trade the 1000 pounds for the 1000 feet.
:EDIT:
I drew a picture that hopefully illustrates the relationship between gears and levers. A lever has a fulcrum, which provides reaction forces, and a length on either side of the fulcrum.
A gear (pulley, etc.) is like a lever with equal lengths on either side of the fulcrum that is lashed/tied/bound to another lever.

The lashing that "ties" the two levers together is referred to as the gear mesh. Two teeth come into contact with one another, and that physical contact causes one "lever" (gear) to push the other.
I'll add a little more information, in the hopes that more detail will help cement the analogy rather than confuse you. Just like the example I've mentioned - two levers lashed together, if you lash them together too tightly then they're not actually able to move at all. The same can happen with a gear mesh - if the gears are too close together, the mesh is too tight and the assembly won't spin.
Conversely, if the lashing that binds the levers is too loose, then when you change direction there will be some dead band where the lashing is sagging. The input is able to rotate freely before the lashing snaps taught again, at which point the output starts to move. Again, the same thing happens in real gear systems - if the gears are too far apart, or the teeth are too narrow, then there is a void between one pair of teeth and the next. This is referred to as backlash.
Again, this might be too much information, but my hope is that you can understand that two gears are like two levers that have been tied together. If the binding (backlash) is too tight then the gears can't move, but if it's too lose then the output tends to get jerked around a lot as the "lashing" goes through the slack-taught-jerk-slack cycle, like a series of flicks instead of a continuous push.