Whenever astronauts on the International Space Station perform spacewalks, they are literally putting their lives on the line. Despite all the safety equipment, there's a lot that can go wrong, and if it ever did, things would look pretty grim.
Perhaps one of the biggest risks astronauts take is relying on a special tether line that prevents an astronaut from floating away from the International Space Station if they ever lost their grip. What would happen if that tether failed, and the astronaut suddenly found themselves floating away? It's hard to say, but it would be tricky to get back to the International Space Station; that's for sure.
All astronauts that go on spacewalks have a special jetpack strapped to their back as a backup safety measure for this reason. If the tether should ever fail, the jetpack should allow the astronaut to carefully propel themselves over to the International Space Station again. But if that failed, the astronaut could face a potentially lethal situation. Other astronauts onboard would have to attempt a rescue mission, but retrieval is tricky and unlikely.
The astronaut would probably end up trapped in orbit around the Earth, far away from the International Space Station, until their oxygen supply ran out, or until the space suit gets a tear in it from space junk. In the first scenario, the astronaut would simply die of asphyxiation, while in the second scenario, the astronaut would boil from the inside out due to the lack of pressure.
Fortunately, this kind of emergency has never happened before, and hopefully never will.