Hi Cody,
LEDs have a very low voltage rating. If connected across a voltage source without a current limiting resistor in series with them, they will instantly burn-out.
The current-limiting resistor's value is calculated using Ohm's Law. But first you need to know the voltage rating of the LED, which depends on its chemistry and colour. I could detail most LEDs voltage ratings but they are listed at many other places and on their datasheets.
Steven's quoted resistors will work fine with all LEDs. They limit the current to a safe amount. Their values can be reduced when calculated properly for use with higher-voltage LEDs at high brightness requirements.
However, Steven's suggestion of only a 1/4W resistor with 24V will make the resistor very hot and burn it out. A 1W resistor is recommended.
I learned the colours of the rainbow when I was a little kid: Roy G. Biv, where Indigo and Violet look like purple. Resistor values are in the same order and Red is 2, Orange is 3, etc. Purple is 7. In addition to the rainbow, Grey is 8, White is 9 and Black is 0. You will quickly learn resistor values if you measure many with an ohm-meter.
How did you make those question-heads run around? That's cool. See, I copied yours and it doesn't move.
View attachment 36178