You Are Not Alone
Despite your sincere attempts to find solitude (a possibility in the wilderness but less realistic on a trail adjacent to, say, the parking lot at Mount Rushmore) you will see other folks. On a long, popular trail you could see literally hundreds. Be prepared to deal with them.
Be Congenial
Other hikers are your friends, even those surly Bulgarians. Hey, you never know who will be going for help when you break your leg. So make eye contact, smile and say "hi" or [shudder] a trail platitude: "beautiful trail", "great day for a hike", "you're almost there", yada yada, as you pass.
It's occasionally appropriate to stop briefly and exchange information: "the bridge is out", "there's a rabid raccoon in the meadow", but don't get bogged down in peripheral chit chat ("nice shoes", "where're you from") unless you're taking a break together.
When you're on a return leg, you will hear "How far is it?" a lot. A whole lot. It's usually accompanied by pleading eyes that tell you the right answer is "just around the bend". Naturally that is never the case. Give it your best estimate, describe any changes in trail conditions ahead, and size up the questioner: note respiration, clothes & equipment, and apparent fitness. Make an encouraging face or discouraging face accordingly.
Right-of-Way
Some trails are wide enough for passing, but many are not.
On Inclines - When encountering other hikers, uphill has the right-of-way. Stand aside you downers! Hikers on the uphill have a smaller field of vision and, due to their greater exertion, their hiking rhythm is pretty important. While they may cede right-of-way in order to get a breather, it's their choice to make. (If you are not afforded this same courtesy by other hikers please refer to Be Congenial, above.)
At Different Speeds - Sometimes you are caught from behind by faster walkers or even trail runners. Let 'em through! This can occasionally lead to a frustrating scenario in which they stop for frequent rests and pass you repeatedly. When you can't take it anymore, change your pace.
Horses, Mules and Llamas - When chancing upon these sizeable beasts give them right-of-way. They are too big to move aside on most trails and, if spooked, can harm rider or pedestrian. On a mountain trail, stand toward the drop-off. Very carefully.
Mountain Bikes - Technically, bicycle riders are supposed to defer to hikers. A lot of them don't because, we believe, the rude gene and the bike gene are on the same chromosome. Our advice is to just get out of their way.
And Duh…- Conversations: Turn down the volume. We have heard entire medical histories from nearby hikers. Yecchh.
- Phones: See Conversations. And guess what? Whoever you called truly doesn't give a damn that you're on Bear Mountain.
- Music: Earbuds please. Sure we like hip-hop. Just not here.
- Litter: Pack out your trash. The most selfless of you can even pick some up. In which case, you should still leave the used Kleenex.
- Dogs: Obey posted rules. Yes we already know you won't.
- Feeding wildlife: Just don't.