I know that the internal energy of an ideal gas system doesn't change during an isothermal process, because an isothermal process requires an equal and opposite amount of work and heat to be exchanged between the system and its surroundings. For example, if the system does some amount of work on its surroundings, then it will absorb the same amount of heat from its surroundings. My question is, how does the system exchange this exact balance of heat and work to maintain the same internal energy? How come the heat doesn't change the temperature, but instead always just exactly replaces the internal energy lost by the system to work? What restrictions make the system undergo such a process?
In an isothermal process, as you say, the temperature of the system doesn't change. If your question is "why?" the answer is simple: by definition.
If your question is "how?", then there are two possible answers. The first is it doesn't matter, whatever process you come up with, which makes the temperature constant, will be called isothermal.
A more useful answer, however is that typically this applies to systems which are in contact with a large heat reservoir. So, the "condition" that you mention is given by the zeroth law of thermodynamics, which imposes thermal equilibrium of systems in contact with each other. To ensure this happens during the whole process, the process has to be slow enough to guarantee the equilibrium is reached at all times.
Just remember that Temperature is constant. To make T constant, all the heat ( if we provide ) should be converted into another form of energy / work by conservation of energy... Just note that " We are not providing heat to maintain the temperature of the system ".. Even if heat wasn't provided, the temperature of the system would remain same as it is Isothermal process....