Lead climbing.
The first person climbs, placing anchors and hooking in to them as they climb, with someone holding the rope at the bottom.
This means that if they fall, they will fall the distance back down to the last anchor, and the same distance again (taking up the slack in the rope). So they place anchors at suitable distances so that while uncomfortable, a fall should not be dangerous.
Once hardware is in place, climbers can transition to using top ropes instead – the rope is run from the climber up to an anchor above them, then to a belay. The rope is kept tight so that if they fall, the rope catches them almost immediately.
It is also worth remembering that a lot of early ascents (and recent ones) are not necessarily done safely, or will require other techniques. Climbing long distances up lesser grades for example may not be practical with fixed lines, so will put more trust in the climbers ability not to fall on easier routes, having climbers tied together, but not to any anchor point – meaning if one should fall they will be caught by the other members in the party. And a lot of early ascents may have been done with no safety line at all and just accepting the risks…
Latest Answers