Money represents a store of value. I work an hour and get money, that represents the value of my work. I then use that value to get a pig, a string, and two oranges, with the value of those items represented by what I paid.
I could have bartered for those items. Money just made that trade easier.