Hello Zeetwo!
Your project of extending the pipe should be an easy one- after turning off the boiler and letting the pipes cool.
Assuming the pipe is steel-
The radiator more than likely has an union elbow on the end or a valve with a union. Each of these disassemble into two parts. (Photos below. The large hex nuts unscrew to separate the halves.)
You'll use a coupling on the existing pipe and a nipple of proper length in the coupling. Half of the union elbow will screw into the nipple, then re-attach to the other half at the radiator.
If the distance that you have to extend is too short for a standard coupling and nipple, a male-by-female coupling might fit.
Or, a standard ground-joint union may make up the height and be usable if you don't have an existing union elbow or valve with union. Do Not use one with a gasket, such as a dielectric.
Male-by female ground-joint unions also exist.
At worst, you will have to go to the main and remove the existing nipple and purchase one of the desired length. If a standard nipple won't be proper length, a good hardware store will make one for you.
If none of the above makes sense, please post a photo or two. That'll help us figure it all out & offer good solutions.
Please also use good pipe joint compound on all threads. Ones with PTFE will make disassembly easier later.
Paul
PS: Be certain to pipe the radiator at the correct end. You used the word "pipe" as singular, so that makes me believe that you have one-pipe steam. If so, put the vent side of the radiator opposite the pipe side.