What is happening when digitalWrite(pinname, LOW) is invoked after pinMode(pinname, INPUT_PULLUP)? I read the Arduino official docs on digitalWrite and am confused about what is happening from an electrical perspective when digitalWrite is invoked on INPUT_PULLUP pins.
Say my code says this:
pinMode(4, INPUT_PULLUP);
digitalWrite(4, LOW);

The docs say:

If the pin is configured as an INPUT, digitalWrite() will enable
(HIGH) or disable (LOW) the internal pullup on the input pin. It is
recommended to set the pinMode() to INPUT_PULLUP to enable the
internal pull-up resistor. See the Digital Pins tutorial for more
information.

Does this mean pin 4 is floating or is it at ground?  Are those two lines of code equivalent to pinMode(4, OUTPUT); digitalWrite(LOW);  ?
It's pretty explicitly stated there in your quote: if you write a LOW when in INPUT mode it disables the pullup resistor. That's all it does.
pinMode(4, INPUT);
digitalWrite(4, HIGH);

is exactly the same as:
pinMode(4, INPUT_PULLUP);

And
pinMode(4, INPUT_PULLUP);
digitalWrite(4, LOW);

is exactly the same as
pinMode(4, INPUT);

Of course this exploits a peculiarity of the AVR's IO block, but any decent core will emulate that functionality for compatibility with older code.