What gives money its value?

You hold a twenty-dollar bill in your hand. It's just a rectangle of paper with some ink on it — you couldn't eat it, couldn't build a house with it, couldn't even start a fire with it very well. And yet a restaurant will trade you a pizza for it. A bookstore will hand over three paperbacks. Why does everyone act like this paper is valuable?
Money gets its value from a deal we all make without really thinking about it. It's an agreement: I'll accept this paper if you will too. The restaurant takes your twenty because they know the electric company will accept it for the power bill. The electric company takes it because their employees will accept it as wages. Round and round it goes — a chain of trust.
