Pretty straight forward, remove keeper cotter pin then remove foot peg pin. Take a picture of the peg before you do it so you can replace in the same fashion.
As long as the new foot peg has the same barrel diameter and length past the pivot hole toward the frame, any should work.