The more amperage a given appliance or device draws on a circuit, the thicker the wire needs to be, correct?
And this is to prevent the wire itself from becoming a heating element.
I understand that a 15A circuit needs a specific minimum gauge of wire, but how does the length of that gauge wire affect the situation?
If the wire is longer, despite the amperage rating of the circuit, would the wire need to be larger gauge?
A wire that will carry 15A without overheating, will carry 15A whether it is 1 meter long, or 1 km long. What will change is the resistance, and resistance is directly related to voltage drop.
If you are powering a 120V load that draws, say 10A., if your wire has a resistance of 0.100\$\Omega\$ (half that in each direction), then there will be a voltage drop of 0.100\$\Omega\$ * 10A = 1V. Your load will not actually see a 120V supply, but a 120-1=119V supply.
Now, if your wire were the same gauge, but 10 times as long, there would be a voltage drop of 10V. Your load would see a 110V supply. Longer still, and you get the idea.
You may wonder what happens if the wire is 120 times as long. Will there be a voltage drop of 120V, and no voltage appearing at the load?
Only if the load acts like a short circuit when there is no voltage applied to it.
As the voltage on the load changes, the current through the load and the wire will probably also change. Some loads are resistive, like incandescent light bulbs. As the voltage across them drops, the current through them will also drop. Other loads behave differently. Some loads will attempt to compensate for a low supply voltage by drawing more current. An example would be most PCs. In such a case, a longer power cord, could cause the PC to draw more current. (Thanks to Bruce Abbott and JonRB for drawing attention to that phenomenon.)
I suppose in a worst case scenario, the current drawn by a load with a very long power cord could be above that for which the cord is rated. However, this would only happen if a fuse or circuit breaker is not present which is properly rated for the current carrying capacity of the wire.
To counteract the voltage drop of long wires, you can use a thicker gauge. That will decrease the resistance and voltage drop. But that is a separate issue from the ampacity or current carrying capacity of the wire. The current carrying capacity of a wire does not change with its length.