LEDs, they're not as difficult to understand as some people make out.
The first thing to note is that there are two main parameters of an LED. The forward current and the forward voltage. This voltage seems to cause a lot of confusion. You apply a voltage, and you get current, right?
Well, that's right for a resistor, which is a linear device. In other words, current is proportional to voltage. The basic equation for calculating Voltage, Current and Resistance is V=IR, and we'll use that later.
However, unlike resistors, LEDs are not linear so they behave differently. Rather than applying a voltage and getting a current, you apply a current and get the voltage. It may sound the same, but it's not.
Ok, here's some maths. Not complicated, if you can add, subtract, multiply and divide, you can do this.
Consider a 150 ohm resistor with 3V across it. The current passing through it will me 20mA
V=IR therefore I=V/R, 3/150 = 0.02
That's simple. Now, reduce that to 1.5V and you'll get 10mA. Increase to 4.5V and you'll get 30mA
An LED on the other hand, rated 3V@20mA may well pass 20mA with 3V applied, but at 1.5 you'll get nothing and at 4.5V you'll probably burn it out.
So, let's try forcing a current through our resistor. Push 20mA through it, V=IR, .02x150, 3V
At 10mA the voltage is 1.5V and at 30mA it's 4.5V. That's linear.
The LED however, will give you 3V at 10mA, 20mA and 30mA (there will be a slight difference due to the internal ersistance, but it's negligible). So, if any current will give you 3V, what will 3V give you? Could be anything.
Why is this? Well,the semiconductor junction requires a certain voltage before it will conduct. This is called the breakover voltage. Once it starts conducting, it will try to maintain that voltage. Therefore, if you apply 4.5V to it, it will try to pass enough current to reduce that supply to 3V and probably burn out in the process.
So, to control the current through the LED you need a series resistor.
Using our 3V@20mA LED, to run it from a 12V supply you need to find the correct value for the series resistor. There are tools to calculate it, but it's really, really easy. We know the LED will have 3V across it, so the resistor will have the remaining 9V across it (3+9=12).
Using our old friend, V=IR we can make R = V/I, R = 9/0.02, R = 450 ohms. Since 450 isn't a preferred value, use the nearest which will be 470. Close enough.
Told you it was easy.
It's not a good idea to put LEDs in parallel, since if there's a slight difference in the forward voltage the one with the lower voltage will take all the current. Why? Well, let's say that one gives 2.95V and the other is 3.05V. Since there are two in parallel, you'll want 40mA so that each gets its 20. So, once they're conducting, the voltage across them will be 2.95, since that's the lower one. That's not enough for the 3.05V one to start conducting, it needs 3.05V. In reality, the internal resistance will even things out a little, but it's not a good idea.
They can be used in series though. Two 3V@20mA LEDs in series will behave like one 6V LED. You can even use different ones providing they all require the same current. Just add the voltages together, subtract it from the supply and put that value in the equation for the resistor.
For example, two green LEDs, 2V@20mA, and one blue, 5V@20mA gives a total of 9V. Remaining voltage is 3V, so the resistor will be 150 ohms. The nice thing about this, especially for battery powered equipment, is that the total current drain for three is the same as for one. Simply put, the battery will last three times as long.