Very basic resistors question

When LEDs have enough voltage dropped across them (their "forward voltage"), they (effectively) turn into short circuits. So you are using the resistor to limit the current flowing to whatever the max current of the LED is (or what level of current you want).

So you use Ohm's law to calculate the resistor value. I explain here:
http://www.cmiyc.com/tutorials/led-basics/