One of the most important pieces of equipment you have when out hiking and backpacking is your footwear. If your boots or hiking shoes fit poorly you can quickly ruin a hiking trip with sore feet, blisters or even worse injuries.
The first rule is to pay attention to the fit of your boots and get a reliable brand. Get help from the shop assistant to be sure that your toes do not slip down and bash against the front of the boots when going down hills. Also be sure that the boot does not compress your calf or Achilles tendon too much as this is a common source of injury.
Getting boots with a good fit is, however, only the start of keeping your feet healthy on the trail. You also need to ensure that your boots are properly maintained. With leather hiking boots this used to be quite a chore and involved not just cleaning the boots with saddle soap and then waterproofing them but also running a wax candle over the stitched seams for added protection. It was a job that took hours and involved sitting the boots in the hot sun to heat the leather to make it absorb the protective coatings. Adding too much, as I once did over some years to a favorite pair of boots, could rot the stitching.
These days the job is far quicker and easier, even with leather boots. Modern leather hiking boots are generally impregnated with silicone or some other form of waterproofing so there is less need for waxy protective layers. But check the instructions. Some modern boots still have soft leather inner layers that need a little rub with saddle soap now and then to protect them from the moisture and salts produced by sweaty feet. Soaps and protective layers have also advanced and are now often water-based. This makes them quick and easy to apply from a sponge-tipped applicator.
Fabric boots are even easier. Generally they need little more than a good cleaning and the application of some water repellent on the outside. But remember to check for grit or stones on the inside. One tiny little stone may be enough to damage the waterproof breathable lining on a good pair of hiking boots.