How Does Money Acquire its Value?

Why does the dollar bill in our pocket have value? The value of money is established, according to some, because the government in power says so. For some commentators, the value of money is because of social convention. What this implies is that money has value because it is accepted, and why is it accepted? Because it has value and is accepted! Obviously, this is not a good explanation of why and how money has value.