First measure the length of the zipper from the bottom stop to the top, where it goes under the waistband. Get a jean style zipper this length or longer. You can find them at JoAnn's or Walmart or many other sewing stores, or online at wawak.com. That's where I used to get zippers when I did alterations and tailoring for the local dry cleaners. I still have some (luckily). I usually get one a little longer and trim the zipper tape to fit.
Second, carefully use a seam ripper to remove the old, broken zipper. Be careful not to cut the denim. Usually, once I get about an inch out, I stick my finger in the space and yank the zipper away from the denim. It breaks the thread and gets it out quickly. Just be careful.
You will probably have to cut the tape out below the bottom stop, since the bartacks on the bottom of the fly will be a challenge to remove and replace. Just get out as much as you can, and carefully remove the tops from the waistband.
Thread your machine with a good thread that matches the jeans (not the gold topstitch thread) and use a size 14 or Denim needle. I use Aurifil thread (40 or 50wt) and a Schmetz Jeans needle. Place your zipper foot on the ankle.
Place the new zipper into position. Make sure the bottom stop is as far down as it can go. I usually pull one side of the zipper tape below the fly tab, and trim the zipper tape on the other side, so it can lay flat. Pin it in place and make sure it's flat and close to where the original was. I usually pin in the side that's between the sectioned part of the fly, not the part with the topstitching on the front. Carefully push the top of the zipper underneath the waist band. I trim the tape, as needed, and use a stiletto (awl) to push it in..
Close the button and make sure the closed zipper lays flat. Pin it to the front of the jeans, from the zipper side. Push the bottom tape down as far as it will go, and push the top of the zipper into the waistband area, trimming as needed. Check to make sure it's flat, and pin carefully.
Finally, Make sure the zipper opens and closes easily, and check again to see if it's flat.
You just saved yourself at least $10 at the tailors, or so much more at your favorite store to replace your jeans!
And, with most sewing challenges, it gets easier as you do them. Let me know if you have any questions. It's similar in trousers, too, although the fabric is easier to sew, and you don't need such a heavy weight zipper. Have fun saving money, and getting some more wear out of your favorites!