How does digital pullups work?
The DHT11 is a humidity and temperature sensor using a single-wire communication between the microcontroller and the sensor.



In the diagram above, the 5K resistor is the pullup resistor, which is tied to Vdd (power supply)..  It keeps the DATA line in a high (1) condition in the absence of any signals from either end of the DATA line.

When the microcontroller wants to send data to the sensor, for a 0 it drives the line to ground (this is called "sinking"), and for 1, it just leaves the line into a high impedance mode, and lets the pullup resistor drive the line high.

Likewise, when the sensor sends data back to the microcontroller, the microcontroller will have the I/O line configured as a high-impedance input.  This allows the sensor to send data by pulsing the line low as needed for a 0.  It also doesn't drive the line high, but lets the resistor pull it up.

So the "normal" state for each of end of the DATA line is for both the microcontroller and the sensor to have their pins in a high-impedance state, and only drive the line to ground as needed to send to the other end.