You have a 9 volt power supply. So that's your start.
Say your LED drops 3.1V forward, and has a current limit of 20ma (typical for a bright white LED)
Subtract that 3.1 volts from your initial 9V supply. 5.9 in this particular theoretical case.
You use the equation R=V/I to find out the resistor you need. 5.9 /.02 Which works out to about 300ohms.
If you noticed the 9 volts is divisible more than once by 3.1, so you could use two LED's in series, for a total voltage drop of 6.1. Do the math again for the same 20ma (.02 amps) and you should come up with 140 ohms of resistance.
Please note V is WHOLE volts, R is WHOLE ohms, and I is WHOLE amps of current (1 MA is .001 AMPS)