An LED resistor calculator works out the series (current-limiting) resistor an LED needs — its resistance and the wattage to handle — from your supply voltage, the LED's forward voltage and the current you want through it. Without that resistor, an LED on too high a voltage burns out fast.
It also picks the nearest standard (E12) resistor value at or above the exact figure, and the power rating to use, so you can grab the right part from a kit.
Resistor R = (supply voltage − forward voltage × number of LEDs) ÷ current (in amps). Power dissipated = voltage across the resistor × current; pick a resistor rated at least twice that. The nearest standard value is taken from the E12 series at or above R. LEDs in series share one resistor and add their forward voltages.
A 12 V supply driving one 2 V LED at 20 mA needs a 500 Ω resistor (use 560 Ω, 1/4 W).