Your first obligation as a dog owner on a hike, after verifying that dogs are allowed on your chosen trail, is to be very sure your dog is socialized to people and other dogs. If a dog is not friendly to others, it must either be on a short leash at all times and controllable by the owner or preferably should be left at home.
Approaching Humans
Please keep in mind that there are plenty of people who are fearful of dogs, and even a leashed dog that is growling or straining on the leash can be frightening to others. Also, a very friendly dog that has a tendency to run up to someone, even with their tail wagging and no barking, can still scare someone.
Always yield to human hikers and talk to the approaching person to resolve any concerns.
I have only hiked with a totally friendly dog, but every time someone approaches, I call out well in advance of crossing paths, “She’s friendly, she may approach but she’s totally friendly.” That has always been sufficient for others to be comfortable, but Aussies are small dogs. If you have a bigger dog and the approaching party is upset no matter what you say, make sure your dog is on a short leash and you move off-trail to give the other hiker plenty of room to pass.
Interestingly, I have found that some folks unfamiliar with dogs on trails are reassured about the friendliness and trail-worthiness of a dog if they see the dog wearing a pack or an official-looking vest of the kind in my recommended equipment list. That vest serves several purposes, including making a dog more visible when off leash.
Horses and Cyclists
When meeting horses on the trail, a dog owner must first yield the trail but must also make sure the dog stays calm, does not bark and makes no move toward the horse. Horses are easily spooked by strange dogs, and it is the dog owner’s responsibility to keep their pet quiet and under firm control. Move well off the trail and stay off the trail, with your dog held close to your side, until the horses pass well beyond you.
The same is true of off-road cyclists. A dog lurching at a cyclist can result in a fall and injury, and that would be the dog-owners fault. Yield to a cyclist the way you would to a horse, but you can move back on the trail as soon as the cyclist passes. If you are on a mountain biking trail, ask the passing cyclist if there are more coming in their party. Let them all pass.
Right of Way
Even without a dog, the hiker moving uphill must be given the right-of-way. There are two reasons for this. First, on steep ascents, hikers may be watching the trail before them and not notice the approach of descending hikers until they are face-to-face. More importantly, it is easier for descending hikers to break their stride and step off the trail than it is for those who have fallen into a good climbing rhythm.
Off Leash
Before you choose to hike with your dog off leash, be sure that local regulations allow this. It is critical when off leash that your dog be totally socialized, responsive to your call and generally stays on the trail. When I see a dog on the trail whose human is nowhere in sight, I know they are likely to get into trouble at some point.
Finally, follow a principle that you have not more than one dog per person on a hike and no more than two dogs total. Three or more dogs traveling together start taking on pack behavior, which can result in even friendly dogs becoming challenging to others not in the pack. Even if the pack remains friendly, imagine a dog-fearing person seeing five dogs bounding towards them! Not good.