How is money generated?
Money is a medium of exchange. It is generated by manufacturing it, just like any other product. Unlike any other product, money (as in currency) has the highest marketability and serves as the greatest store of value. Any currency has to have these 2 properties. I'll illustrate this with an egg: Suggest that you are an egg farmer.Highest marketability merely means that everyone is happier when you pay them in money than when you pay them in eggs. On your egg farm, your workers will be happier when you pay them in money than when you hand them a tray of eggs for a day's work. In turn, you can get eggs with money, but you can't usually trade eggs for something else in the barter or direct exchange way.
A store of value means you get a bit more time to decide what you'd like to trade. This means you aren't limited by how long your eggs stay fresh in order to make purchases in the direct exchange/barter way, but you can shove all the money under your mattress for a rainy day.
As you can see, our current system separates the basic economic principle of exchange from money entirely. In short, 'let them eat credit'. You don't exchange your eggs on your egg farm for a car with money serving as a convenient medium of exchange. Instead, your car is usually bundled with financial services, guarantees that you won't default, monthly instalments and insurance to the extent that it's more about currency than exchanging goods and services for other goods and services.
For this reason, amongst others, the Rothbards of the world believe we should stick to an objective standard for money. The first known cases of money did this, with measures of silver equal to a certain amount of grain. Which leads us to your next question:
What conditions exist when this money is created?
It varies. Money as in a medium of exchange is usually created whenever you have something that I value and I have something you value, but we don't value them equally and we find something that has a higher marketability and serves as a store of value. This could be anything, from the Roman Empire's silver coins (which served as currency as far as India and existed side-by-side with bartering), to cowrie shells, which was the currency of choice in Africa for hundreds of years. By the way, cowrie shells also cast doubt in the notion that there is no empirical observation of currency taking root, besides the fact that debt is also currency.The exact material used for money depends on many factors. In history, the most common denominator is usually some precious metal, like gold. This is because it is scarce, its purity can be determined objectively and it can be weighed objectively, so it serves as a standard. I still think we should use beer as our currency. Often, people were not happy with the authorities meddling with the purity of commodity money, which brings us to: