Basically:
Commodity money has another value or use, such as gold/jewelry/shells or possibly metal coins.
Fiat money is worthless without a guarantee from a government (notice on US currency it says people MUST accept this for all debts).
Commodity money derives its value from the the commodity out of which the good/money is made from. So if a gold coin was made, the value of the coin would be its value in terms of gold rather than the face value of the coin. Commodity money developed as a more convenient form of trade because it is superior to barter. However, commodity money is prone to huge fluctuations in price.
Imagine the commodity chosen was gold, and a new gold deposit is found. Those who held lots of gold (think modern day banks) will lose a lot of their wealth. Also, if food (such as dried beans) are used, what happens during a drought or a famine? All the money is used for consumption so trade becomes more difficult.
In modern days, some prisons or jails use cigarettes or alcohol as a form of commodity money. Without an official legal tender, people have to choose something that is common, stores its value, and is convenient. Cigarettes are light, easy to conceal, and can last for years (best smoked within a month though).
Fiat money was first introduced as a more convenient form of money. Instead of having to carry around gold/silver/cigarettes we could carry paper backed by the government. Over time governments have been less willing to back up their fiat currency with gold or other commodities so fiat money has essentially become faith based in your government who issues it. Most governments require that their currency be accepted to pay debts.
In my travels, I have experienced a few countries who have refused to take their local currency because I was a foreigner. In Egypt, I tried to pay for my visa and hotel with local currency and was refused a visa until I paid in Euros, and received a discount for paying the hotel bill in American Dollars. In Laos I received a discount for paying for goods in Thai Baht instead of Laos Kip. Finally, in Slovakia I was able to pay for all of my purchases in Euros even though this apparently was not allowed by the government.
You can see from these anecdotes that faith drives the value of Fiat currency, and as soon as faith is lost, other forms of money are desired, whether it be Gold/Dollars or bullets.