If the zipper is stuck, then rubbing wax or grease onto the zipper may help to loosen it and make it easier to open and close. Get a candle or some Crisco and rub it along the length of the zipper on both sides. Then, try to open and close the zipper. The zipper pull should move easily now. Be careful not to get the wax or grease onto the surrounding fabric. If you have a zipper pull that simply will not stay up, then attaching a keyring or safety pin to the zipper pull can help to keep it in place. If you use a keyring, then you can loop the keyring around the jeans button when the zipper is up. If you use a safety pin, then you can insert the pin through the fabric near your zipper when the pull is up. Another option is to spray some hairspray onto your zipper to prevent it from sliding down as easily. Spray hairspray along the length of the closed zipper teeth. This should make them tacky enough that the zipper will not keep sliding down. that is beyond repair. If the zipper is so broken that you cannot fix it, then you will likely need to replace it. Get a replacement zipper that is the same size and color as the original. Then, remove the old zipper with a seam ripper and sew in the new zipper.

Summary:
Use wax or grease to unstick a zipper. Add a keyring or safety pin to prevent a zipper from unzipping. Replace a zipper