Could someone explain to me in plain english how this was accomplished?
Well the Rangers did not soft-land. They plummeted into the surface.
The Surveyors soft-landed. The majority of the trip to the Moon was in a translunar coast. At a certain point determined by the ground, based on telemetry, tracking, and a predetermined plan, the spacecraft was turned around and a powerful retrorocket was fired. This rocket slowed the approach from cislunar speeds to an approach speed, timed precisely to leave the spacecraft at a certain altitude above the surface, descending at a certain rate.
Then the terminal descent program kicked in, which merely maintained a constant descent rate until contact.
The time needed to transmit and receive signals to and from a probe landing on the moon is significant.
Correct, which is why no real-time control was attempted from Earth during phases were close timing was critical. The retrofire ignition was time-critical, but it was a singular event. Once initiated, no further ground control was needed. You just send the ignition command 1.3 seconds before you need ignition to occur. After that, the spacecraft guides itself (i.e., maintains the proper attitude).
To program a device to land via a set program could not take into account any discrepancies for significant alterations in parameters, such as altitude, terrain so on.
Correct. The model for retrofire ignition was based on an idealized shape of the Moon, which indeed would not allow for local variations in terrain such as hills or hummocks. Hence the terminal descent program is meant to start relatively high (to account for any local maxima) and descent at a constant rate of descent until it contacts the surface. This rate of descent is fast enough to be sustainable for several seconds, yet slow enough to be within the limits of the landing gear to absorb.
Imagine groping in your dark bedroom for the lightswitch. If you get up from your bed and start walking, you know approximately how far it is to the wall. You may walk briskly for a few steps to cover the distance, then slow down and walk slowly with your arm extended until you touch the wall. You walk slowly enough that it won't hurt when you run into it.
Now you may ask how they would avoid boulders, craters, and other obstacles that may possibly upset the spacecraft. The answer is that they didn't. That was part of the risk of the mission. They accepted the possibility that one leg may land on a large boulder and that the whole thing would tip over. This is why manned landings had a generally higher expectation of success; the pilot could see and avoid obstacles because he is actually there seeing them and piloting the vehicle.
In short, Surveyor's descent was open-loop guidance, Apollo's descent was closed-loop guidance.