I think you have to understand the particular circuit in-which the resistor is used.
And before that you should understand Ohm's Law which describes the relationship between voltage, resistance, and current, and Kirchhoff's Laws which describe how voltages & currents sum-up or divide in series and parallel circuits.
Kirchhoff's Laws get a little complicated but as long as you understand that current "flows" you can see that an LED & resistor in series both have the same current flowing through them. Then if you apply Ohm's Law to the resistor you can figure-out that voltage is being divided between the LED & resistor. (If you have 5V total with 2V across the LED, that leaves 3V across the resistor.).
That's a Voltage Divider with the LED replacing one resistor.
Some analog "sensors" are wired as a voltage divider where the sensor replaces one resistor. When the resistance of the sensor changes, the voltage changes and you can measure the voltage.
Or SOME KIND kind of current limiting or current control.
High-power LEDs (1 Watt or more) normally use a switch-mode constant-current supply.
LEDs are an odd special case because LEDs (like all diodes) are non-linear. The resistance of the LED changes when the voltage across it changes.... As you go above the forward operating voltage the resistance drops drastically and if you don't have a way of limiting current it will burn-up (and possibly burn-up something else).
IDEALLY, if you were studying electronics you'd have a good understanding of Ohm's Law and Kirchhoff's Laws before studying LEDs... But if you start with the Arduino you're probably going to use an LED right-away.
The most common use of resistors in digital circuits is as a pull-up or pull-down resistor. For example, unconnected Arduino inputs are "floating" and undefined - They can read high or low. If you connect a switch/button and the switch is off the input is still floating, which is pretty useless! So we add a pull-up or pull-down resistor. When the switch is turned-on the resistor is "overpowered", current flows through the resistor and the input is forced to the opposite state. In this application, the resistor value isn't important and resistors between 1K and 10K are common. (A lower resistance "draws" more current and "wastes" more energy, and a higher resistance is more-prone to noise pick-up so you don't want to go too extreme.)