Depending on he size of your halyard / safety line, you want the prussik cord (loop of line tide together with a triple fisherman knot, about 1.5 0 2ft once tied, so about 4 ft or so before tying together)
The prussik cord must be smaller diameter than the rope you are attaching it too, about 60-70% of the larger rope size, so it will grip on the larger rope.
I normally use about a 6mm cord, but often 7mm is used. ^ mm which works on most 10mm climbing ropes, and also works OK on my skinny twin 8mm climbing ropes. You don't want too small a diameter, as it must hold your weight, in a fall, but going too large will make it slip, and therefore not catch a fall either.
As you ascend, you can tied off quick knots every few feet, underneath the prussik, as another backup. Only takes a second to tie a figure 8, or overhand knot, on a bite.
here is a good link to the prusik: I use a triple (wrap around 3 times). You should "tend" prusik knots as you ascend, meaning keep them fairly even and tight, and just pull down hard on it, to see if it grabs the rope. You will know if you have it too loose, and it doesn't bite. You will still be able to push / slide the knot up with your hand, even though it is tight enough to catch a fall, if the end is pulled on.
The Prusik Knot or Triple Sliding Hitch