I attacked someone and now they are mad. How can I calm them down so I can talk to them?

Solution 1:

Yield to them - sheath your weapons.

Unless they really dislike you (like Bandits, or a several thousand gold bounty, for instance) they will stop fighting once you do that.