The power delivered to a resistor, all of which it converts to heat, is the voltage accross it times the current thru it:
P = IV
Where P is power, I is current, and V is voltage. The current thru a resistor is related to the voltage accross it and the resistance:
I = V/R
where R is the resistance. With this additional relation, you can rearrange the above equations to make power as a direct function of voltage or current:
P = V2/R
P = I2R
It so happens that if you stick to units of Volts, Amps, Watts, and Ohms, no additional conversion constants are required.
In your case you have 20 V accross a 1 kΩ resistor:
(20 V)2/(1 kΩ) = 400 mW
That's how much power the resistor will be dissipating.
The first step to dealing with this is to make sure the resistor is rated for that much power in the first place. Obviously, a "¼ Watt" resistor won't do. The next common size is is "½ Watt", which can take that power in theory with all appropriate conditions met. Read the datasheet carefully to see under what conditions your ½ Watt resistor can actually dissipate a ½ Watt. It might specify that ambient has to be 20 °C or less with a certain amount of ventillation. If this resistor is on a board that is in a box with something else that dissipates power, like a power supply, the ambient temperature could be significantly more than 20 °C. In that case, the "½ Watt" resistor can't really handle ½ Watt, unless perhaps there is air from a fan actively blowing accross its top.
To know how much the resistor's temperature will rise above ambient you will need one more figure, which is the thermal resistance of the resistor to ambient. This will be roughly the same for the same package types, but the true answer is available only from the resistor datasheet.
Let's say just to pick a number (out of thin air, I didn't look anything up, example only) that the resistor with suitable copper pads has a thermal resistance of 200 °C/W. The resistor is dissipating 400 mW, so its temperature rise will be about (400 mW)(200 °C/W) = 80 °C. If it's on a open board on your desk, you can probably figure 25 °C maximum ambient, so the resistor could get to 105 °C. Note that's hot enough to boil water, but most resistors will be fine at this temperature. Just keep your finger away. If this is on a board in a box with a power supply that raises the temperature in the box 30 °C from ambient, then the resistor temp could reach (25 °C) + (30 °C) + (80 °C) = 135 °C. Is that OK? Don't ask me, check the datasheet.
Best Answer
This refers to the most common type of semiconductor heating cable I've installed, self regulating heat trace. A variety of temperatures are available but the bulk I have seen is used to prevent lines or devices from freezing.
You can see from the image that the cable is composed of two tinned copper bus wires of low resistance connected by a body of semiconductive plastic, and then a number of protective/insulation layers.
Different materials have different resistances per cross sectional area or resistivity, and a larger wire will have lower resistance given the same material. Power dissipation(\$P\$) is equal to current(\$I\$) squared times resistance(\$R\$) or voltage drop(\$E\$) times current, or in formulas:
Watt's Law:
\$P=I^2R\$
\$P=EI\$
by controlling where the resistance is, you control where the power is dissipated, and that control is the function that auto regulating semiconductor heater cables perform for you.
The semiconductor is chosen based on the desired regulation temperature to have high resistance at or above that temperature, and lower resistance the farther below that temperature it reaches. The advantage to this setup is that the cable is able to provide differential heat only where it is needed across its length. You can take an outdoor rooftop plumbing line that passes through multiple different ambient temperatures, run a single cable along the entire length of it and insulate it. Because the cable produces heat only where it's needed, you don't have to be concerned with doubling it up or overheating the portion that is in a warm environment. You can also keep the cable hooked up year round without active control of the circuit because during times when the temperature is high, the semiconductor resistance is high and very little power is dissipated. For critical building function, they use no more power than is necessary(in this use case) to keep the pipe from freezing, and thus they minimize the electrical load on a building UPS or backup generator.
The low resistance backbone cables dissipate very little power, and just get the current to the places where the semiconductor is cold enough to have lower resistance. They still have some power dissipation, especially when a cable is first turned on in a colder-than-setpoint environment and a current surge occurs, but they are sized so that their power dissipation will be insignificant compared to that of the semiconductor once it has reached normal operating temperature.
So at points along the length of the cable, temperature will drop below setpoint and at these points, the current flows from the low resistance bus cables across the comparably much higher resistance of the semiconductor and produces heat. The resistance of the semiconductor at the points where current flows is still much higher than the resistance of the copper, but low enough to allow current to flow.
The current increases proportionally to the decrease in resistance, but the power dissipated increases by the square of the current, so the device reacts aggressively to maintain its temperature. A 10% decrease in resistance will result in a 10% increase in current and a 10% squared increase in power dissipation. This means that the farther below its setpoint the cable is, the more quickly it will heat back up to its setpoint.
I've been looking for a graph that shows the semiconductor resistance "knee", but haven't found one yet, but hopefully this improves the answer for now.
Wires have little resistance and generate little heat.
Heater has much higher resistance and generates lots of heat.
With 10 Amp flowing heater would generate 1000W, wire 0.1 W each.