How do dogs distinguish between people and other dogs?

By their keen sense of smell. Answer: Also, by the shape and size of someone and what their voice sounds like.