The basic principle: your physical distance from someone often telegraphs how “close” you are. Here’s a diagram to help illustrate the point:
In case you’re wondering: the distances in the diagram are roughly based on what “felt right”, though I can see now that it seems roughly based on the width of a person’s body.
via davidseah.com
… and here is a short article with some references: http://www.cs.unm.edu/~sheppard/proxemics.htm