How do I pack a backpack to prevent injury to my back and keep it comfortable while hiking?
The key to keeping your back happy is to drive as much pack weight to your hips as possible. A side note on weight is that the lighter your pack overall, the happier your back.
A lot of the packing order depends on your particular pack, but in general, the bottom of a pack is below your hips. Therefore, it is best to put something big and light in the bottom. A fleece is one idea, or your sleeping bag (if it's down, might be less great if synthetic due to the amount of crushing that will happen).
Now that we have the level of stuff above your hips, heavy things go next, right against your back. I like to put my food bag on one side and the tent on the other. Down the middle, cooking gear, maps, books, etc.
If there is room left away from your back, stuff your sleeping pad and random clothes.
On the top all this stuff, put whatever light items you have left (i.e. repair kits, first aid kit, rain jacket).
The key to this idea is that your heavy things are silo-like, i.e. tightly packed stuff sacks. That way their weight will be driven to your hips, and anything stacked on them will also drive weight to your hips. The "looser" your packing job, the less efficiently this will happen.
Well, this can somewhat depend on the type of backpack you have and the length of the trip you're planning to take (so how much you will be carrying), but there are a few general principles that apply to almost all situations:
From the bottom up:
As mentioned in other answers, it will depend on the type of your backpack. You can for example pack like this:
First you unbuckle all straps of your backpack, and lay it on the ground. Next to it you spread your ground sheet or shelter half, fold your sleeping bag or blanket on top of it, so it will be about as wide as the central part of your backpack, and put your extra clothes, food for cooking in the evening and morning, and anything that you will not need during the day, like so:
Then you fold the top and bottom parts of the sheet over your sleeping bag or blanket,and roll everything up tightly. Place the roll on the central part of the bag (if the roll is too large, you have too much stuff. Get rid of some of it), like so:
Fold the bottom flap up over the roll, fold the side flaps over the roll as well, thread the side straps through the middle strip on the bottom flap, and buckle them to the other side strap. Then fold the top flap with a detachable compartment down, and buckle the long bottom strap to it.
Place items that you will need on the trail, but don't want to keep in your pockets (map, snacks, emergency kit, rain poncho, ...) into the top detachable compartment. Strap your pot, canteen, hatchet, knife etc to the outside of the pack with extra straps, and you are ready to go. A nice example of the finished product can be found here.
One option that is super useful when you're travelling in a group is to have different packs for different purposes rather than each person carrying their own stuff. For example we have a "tent pack" and a "kitchen pack". The advantages include:
If you're in a group of 2 or more, consider it. Also, if you don't live together and didn't pack together, the pause before setting off during which you reorganize everything into categories is a fantastic way to check that you've all brought the right stuff.