The first step to cleaning a backpack is to empty everything out of all the pockets. Leave every pocket unzipped or unfastened. Look for any tags that offer washing instructions. Most fabric backpacks can be either handwashed or machine-washed. Leather backpacks should be cleaned following the instructions for cleaning leather shoes and hats.
Remove any straps or metal parts. If the straps need cleaning, wash them by hand in a solution of liquid detergent and warm water. Allow the straps to soak for 30 minutes to loosen soil and then rub to clean. Rinse in cool water and allow to air dry. Do not use a clothes dryer.
If the backpack has stains, use a soft brush (old toothbrush) dipped in a detergent and water solution to scrub away any residue. Place the backpack in an old pillowcase and wash in warm water with regular detergent using the washer's gentle cycle.
When the cycle is finished, remove the backpack from the pillowcase. Use an old towel to wipe down the inside of the pack and each of the pockets. Allow the backpack to air dry. Do not place in a dryer or dry in direct sunlight.
You should wash a backpack only once or twice per year if it has waterproofing. Too much washing and detergent can lessen the pack's ability to repel water.
Specific questions? Just ask here.