How does the circuit "know" that it has to maintain a constant current?
When physics textbooks talk about how electricity works, they are generally talking about how steady-state electricity works, although they often don't explicitly state that assumption. All real-world electronics components have some capacitance, so when the voltage changes there will be differences in current, but those differences will last milliseconds. Once an equilibrium is reached, the current will be the same throughout the circuit because otherwise there would be a buildup of charge.
Remember that the current out of one bit of the circuit is the current into the next bit. If there's less current coming out of the resistor, then the part of the circuit after the resistor will have to have less current (unless it previously had a buildup of charge that it's discharging). One analogy for electricity is water. The amount of water flowing through one section of pipes has to be equal to the flow through the next. You can't make water appear out of nowhere.
How does it know that it has to increase the potential difference across it? [...] and with more resistance, more is the potential difference due to Ohms Law
You can write Ohm's law as $V = IR$, but that is somewhat misleading, as voltage is not caused by resistance or current. Current is cause by voltage, and resistance determines how much. You're phrasing it as if more resistance causes more voltage. That's not the case. The resistor isn't increasing the potential difference across it, it is reacting to the potential difference that the EMF is creating. Writing Ohm's law as $I=V/R$ is in many ways a less misleading form, as it better represents the causal direction. For instance, in a circuit driven by a battery, the battery supplies a voltage difference. That causes there to be a voltage difference across the resistor, and the higher the resistance is, the less current flows. You can't reduce the voltage by reducing the current.