In an ideal case, if both inputs of an uA741 were connected to Ground, the output should be at precisely ground potential. However, due to practical constraints in actual behavior of the IC, this does not happen, the output typically is "offset" by some voltage, either positive or negative relative to Ground.
This output offset voltage is the voltage seen at its output, when the inputs are both connected to ground (not "no input voltage is connected"): It is important to keep in mind that a dual-supply op-amp like the uA741 operates on a dual power supply, +V and -V, and ground is midway between these.
The offset null pins allow for nulling this offset. This is thus an adjustment input mechanism provided by the IC designers: Moving the wiper of the potentiometer changes the ratio of currents from each of the offset-null pins to -Vdd. This ratio is used to inject a corresponding adjustment to the output voltage.
Specific to the question, thus: It is not resistors that are used to directly null any offset, but a potentiometer or a pair of resistors, to set a ratio of currents that works as internal input for the required adjustment.
Also, see another question here, What is “offset null” in IC 741?, for a good explanation approaching the same question from another side.