Here's the famous pyramid....
V
I R
V = IR
I = V/R
R = V/I
You need to use the bottom equation. Your LED will have a current rating, most are around 20ma, but will depend on brightness & colour.
R = 12/0.02 = 600 Ohms
And the other thing to make note of:
P = VI (Power in watts)
P = 12*0.02 = 0.24W
So you need your resistor to be at least 1/4 of a watt rated.
Just replace 0.02 (20ma) with the rating of your led in the above equations and you should be good to go.