When an MCU pin is an output, it is pulled to +V when high, and to GND when low, using a transistor-based circuit.
When an MCU output pin is connected to an input with a pullup resistor, the input will be pulled to GND if the output pin can sink enough current to overcome the pullup.
When the MCU output pin is high, the current flows from +V at the MCU output pin, to the other input, and from there to ground. No current flows through the pullup resistor.
When the MCU output pin is low, the current flows from +V through the pullup resistor, and to the MCU output pin and ground.
You can also model the situation roughly with a resistor divider, by assuming that there is a resistor in series with the MCU output pin. Then, that resistor and the pullup resistor form a voltage divider. Let's say the pullup resistor is R1, and the MCU output pin has resistance R2.
When the MCU output pin is high, the two resistors are in parallel to +V, and the input is at +V.
When the MCU output pin is low, the two resistors form a resistor divider, and the voltage at the input is V×R2/(R2+R1).
For example, if R1 is 10 kOhm, and R2 is 500 Ohm, then the voltage in the input is V×500/10500 ≃ V × 0.047.
This means that the pullup resistor must be weak (high resistance), so that the MCU output pin can overcome it (low resistance), or the voltage in the input will remain too high to ever become low.