Remove the jeans on the left side and inspect the seams. Usually between the seam and overlock 3-5 mm. there is a loose strut Carefully thread on a seam, but the sewing machine is don't touch it. Its width is not very big on most things, so what you gain in the extra millimeters will be minimal, and the amount of work will increase significantly. Asprivate the side of the leg, and the landing place before.
Now keen to close the overlock seam or simply sew on the machine. Better make a double stitch - so it will be safer. For sewing, use a thick strong thread, unless of course you don't want to come home at a randomly flowing pants. Denim - a dense material, so the mechanical action on the thread while walking is strong enough. If your house is all bought long ago thread, go to the nearest store and buy a new skein.
As soon as the work is done, try the jeans. If they are at the time, but the belt a little too tight, remove the old button, and a little closer to the edge sew the usual beautiful button. Well, or go to a Shoe shop and you will put again the rivet, just a different place.
The pants wash and can go in the updated model of jeans without fear that they will get press. It is usually not enough for complete happiness these few millimeters that you have received as a result of simple work.