Start by securing the pipe firmly in a vise so it doesn't move when you're threading it. Then, use a pipe cutter or a hacksaw to cut the pipe to length. Select a die head that is of the appropriate size for the pipe you want to add threads to, then attach it to a ratcheting pipe threader handle.