The resistor is a common electrical component used in virtually all circurts. It is used to controll current. For example lets say you want a LED to turn on and you have a 9v battery to power it you can conect the LED to the battery which will cause the Light to turn on and then burn out. Why? because to much current is flowing through it the led only needed 3mA to turn on but you gave it over 35mA causing the light to burn out. The way to fix this is to add a resistor in series with the LED the resistor will controll the current passing through the light and stop it from burning out.
Whats Resistance?
Resistance can be defined as the opposition force to current provided by the material the current is flowing through.
Let's figure out what this means. Materials are divided into to groups conductors and insulators. In a conductor it has electrons that move easily so current can pass through with out much resistance but in a insulator current can not pass through so easily. Therefore a resistor could be thought of as a mix between a insulator and a conductor
How to Calculate Resistance
To calculate resistance you need to use Ohms law which is R = V/I or Resistance is equal to Voltage divided by Current. Lets test it out lets say you have a circuit that is running from a 9V battery and you measure the current and 35 miliAmp(current is measured in Amps and a 1 miliAmp is = to 0.001 Amps ) is flowing therefore the resistance of the circuit should = 257 ohms approximately (ohms is the measurement of resistance) because 257 = 9/0.035