A RESISTOR turns some electrical energy into heat and limits current. LEDs need one to avoid burning out. The coloured bands tell its value.