ALL OF THE ABOVE.
The paper currency in the United States has value because it is useful, it represents precious metals, and the federal government says it has value.
Before paper currency became a legal tender, precious metals were used as payment for various goods and services. Bringing precious metals everywhere you go is very difficult. It is because they are heavy and bulky. It was decided that instead of bringing precious metals anywhere, paper currency will be printed which represents the value of the precious metals.
Printing paper currency is limited to the value of the precious metals on hand. The United States can not print paper currency anytime it wants to because the paper currency is backed by its precious metals (gold, silver, etc) placed under federal reserves.