I have heard that you can change direction, which shifts their focus. However, my B is crafty. If there is a dog in the distance (and I want to continue on our walk) she will pretend she is snacking on the grass or smelling a bush so she can either give them time to reach us, or watch them carefully. I know what she's up to, but it's almost adorable to see her try to outwit me.
As for the pulling, I suggest the following: stop moving, hold the leash in a way that you are restraining her tug but you have enough slack on your end to rest it on the ground and step on it. Your body weight is a better deterant than an arm that moves about. This is a good time to introduce a command specifically for this type of situation, "leave it", "chill", etc. If your pup continues to strain while you are standing on the leash, shorten it so that her only options are: stand, sit, or lay down. Once she is calm, praise her. Then, if you see a trigger off in the distance, you can try to prevent the behavior ahead of time by stopping and standing on the leash before the dog or person gets close. Remain consistant with your chosen command word. After your pup becomes successful with the patient wait, you can graduate to only using the command while you continue walking past the trigger.
As an aside: IMHO, socializing your pup to people and other dogs is a positive step in their development. Don't try to prevent your dog from sniffing and saying "hello", just try to teach her how to be polite about it.