When current flows into a resistor, a voltage difference develops across it, according to Ohm's law.
This means that one lead can be at a different potential from the other one.
If current does not flow into the resistor (or if very little current flow, due to the high impedance of the subsequent stage) both leads are at the same potential. You have transferred the potential at one lead to the other lead. So, if the lead with a definite potential is at Vcc, you 'pulled up' the potential; if it is at ground, you 'pulled down' the potential.
The switch in the Wikipedia figure is there to change the state from "no current flows" (hence both leads are at the same potential) to current flowing (hence, the leads can be at different potential).
When you close the switch you pass from one state to the other.
By forcing one definite state (usually it's either Vcc or ground), you avoid floating inputs (they are bad because they tend to pick up noise). Also, as Tony pointed out in its answer, you can use an open collector stage as the switch.
But you want to know why, when there is no current flowing through R, both leads are at the same potential.
If Ohm's law does not give you a satisfying answer, I guess you have to consider that a conductor where no current is flowing must be equipotential.
Edited to change "other" with "at a definite potential"