The secret to packing clothes in a backpack is to roll them up rather than fold them. Once you've decided which clothing you're actually taking on your trip, it's time to roll up as many clothing items as you can (even your socks and underwear to save on space).
For bigger items like T-shirts, fold in the arms to make a rectangle, then fold the T-shirt in half, and then half again to make a long, thin rectangle. Next, roll it up and you'll be able to place it in your backpack while saving a lot of space. For items like socks, these can be fitted into shoes (if you're packing them) for maximum efficiency.
Some people worry about creasing when folding up clothing. By rolling your clothing to pack it in a backpack, you're just reshaping the material — you're not compressing or squashing it. The aim is to push unneeded air out of your clothing so that it fits more tightly into your bag.
You're controlling the amount of space taken up by rolling rather than folding. You want every inch of space in your backpack to be effectively used. This is why having a flexible, ergonomic and light backpack is also important, as it will stretch and shape to the items you pack in it.