Mirror Neurons
Mirror neurons are a type of brain cell that fires when you do an action, and also when you simply watch someone else doing the same action.
For example, when you are grabbing a cup of coffee, Motor Neuron A (which also happens to be a Mirror Neuron) fires to tell your hand to reach out and grip the handle of the cup. When you watch your friend pick up his own cup of coffee, Motor Neuron A also fires as if you were also picking up his cup of coffee, even if your hand is not moving at all.