The main function of resistors in a circuit is to control the flow of current to other components. ... If too much current flows through an LED it is destroyed. So a resistor is used to limit the current. When a current flows through a resistor energy is wasted and the resistor heats up.