It is easy, simply put a nut on with the wheel off leaving about 1/3" thread exposed, ie not fully wound on, then hit with hammer, they will pop out.
To pull new ones in, try and use a normal nut, NOT a wheel nut as these are tapered, with a few thick washers so put the new stud through the hole from the rear of the hub flange, then washers over it, then nut and tighten, keep looking at the rear of the hub so you can see if the stud has butted up flush, you will feel it drawing through the hub then get hard as it butts up against the rear of the hub flange.
Make sure you line the fine splines of the stud up with those in the hub before pulling in.
tabetha