Zipper sliders break or wear down often because they are the weakest part of a zipper. If the slider falls off, it can be easier to simply reinstall it than replace the entire zipper mechanism. However, if your slider is broken you should replace it with a new one.
Identify the stitching which crosses the zipper at its lower end. This stitching needs to be removed. Place the sharp edge of the seam ripper or scissors against the thread and pull gently to cut the thread without damaging the fabric. Removing this seam should allow you to pull the fabric back, revealing the end of the zipper.
Pry off the metal stops using pliers. These stops, two pieces of metal placed at the end of the zipper, are designed to keep the slider from falling off that end. However, since your slider is already off, you'll need to remove the obstruction. Grip each stop with the tips of the pliers and bend it upward to remove. Discard the stops; they are no longer usable.
Align the new slider so that the zipper ends enter the wider side of the slider. Carefully pull the ends of the zipper tape through the top grooves of the slider. Use a pin if necessary to guide the fabric through. Adjust tapes by pulling gently on the ends, so that the slider sits evenly.
Guide the slider upward until the zipper teeth lock. This may take several tries; if teeth are not aligning properly, you may need to remove the zipper tape from the slider and reinsert.
Test the slider by carefully moving it up and down the zipper. If it is working correctly, create new stops out of thread by passing a threaded needle through and around each side of the zipper tape several times. This will stop the slider from falling off the bottom of the zipper. Once you've created new stops, replace the seam you cut earlier by sewing it in place.
If your zipper slider is very worn, it's best to replace it rather than reinstall the same one.