there are many different drugs which have been used. The original was amphetamines. They can, like kill you. That's what Merckx used, but he was careful. Then there was a period where people used combinations of heroin and cocaine. Killed the pain and gave energy. Neither of those are good for you. Modern day, it's been EPO. That increases the number of red blood cells. Before they could detect it, they knew riders were using it, so they put a limit on the number of red blood cells at a hematocrit of 50, because over that they can clog capillaries and yes, kill you. So riders who used EPO were under a doctor's care. Oh, and then there's testosterone and steriods for muscle building and recovery. There's a lot of controversy over the use of testosterone. People on this forum use it regularly. Steroids definitely screw up your body, though. Not good.
There are many other legal PEDs. Caffeine is the most common. Works good.