Money, according to most Economics books, needs to fulfill these three main functions in order to be considered as such: 1) be a medium of exchange (the most important imao), 2) store of value and, 3) unit of account.

If any item/thing can satisfy the condition of being a medium of exchange in a certain society, then that can be considered a currency. I remember I once heard about the fact that in Zimbabwe, because of the hyperinflation they were experiencing and the complete devaluation of their fiat system, people started using cows as a medium of exchange. I don't know how they came to adopt that as a way of exchaging their goods and services, but I guess it was because there was consensus and people had confidence in such system.

As for the store of value function, I suppose that if something is to be considered as money, it needs to preserve its value throughout time. It's for saving and investing purposes. And that's why fiat money (specially certain currencies such as the Argentinian Peso or the Venezuelan Bolívar) isn't a good alternative in this case due to the fact that monetary authorities keep printing bills to pay for debts and over expenses, without fiat being backed by the same amount of production of goods and services in the market. Thus, fiat/cash loses its value as time goes by. Fiat might be great as a medium of exchange (as people use it to purchase goods and services in daily life, so that's the short run) but it's terrible as a store of value (the long run.)

Finally, the unit of account function of money is related to the need to serve as a the base of comparison for prices and record debts. It's for measurement and accountability purposes.