Most looms are fairly easy to remove a broken or cracked peg with pliers. For a broken peg with stub showing (see below), grab the remaining stub at the base of the loom with a sturdy pair of pliers and simply pullout. Do not twist or bend the peg stub.
However, if the break is lower, flush with the loom, it can be more difficult. Using a drill, drill the stub out from the top of the peg. The drill bit needs to be the same diameter as the peg. Drill out the entire peg stub so that you have a clean hole. Then insert a new peg. Use a (light) swipe of Loctite Super Glue on the new peg. Put it in place and immediately clean up any glue that oozes out. Make sure peg is facing correct direction. Allow several hours for the peg to dry completely.
Note: Do not over-drill by making the hole too large. The Afghan loom peg is approximately 3/16“ diameter.