Purchase a backpack lock. There are specific locks made just for backpacks. They are lightweight combination locks and are designed to fit easily through the holes in a backpack's zipper pulls. Small keyed locks can also be used.
Set the combination of your lock. Locks come with a simple preset combination such as "000." Follow the manufacturer's instructions to set your own combination.
Pull your zippers together so that they meet. Unlock the lock and slip the shackle through both holes in the zipper pulls. Close the lock and spin the dials so that the combination is not visible.