An article in Nature suggests that the brain actually simulates another person’s brain processes when trying to predict their actions.

A system in the human brain for predicting the actions of others