From 1500 to 1650 Spain is said to have brought 180 tons of gold, and a staggering 16 000 tons of silver. This was triple the current European silver reserves. A large amount came from a mountain in modern day Bolivia known as Cerro de Potosi, which is supposedly made of silver. The silver, and other goods, were often shipped to Panama and then taken to Spain by the Treasure Fleets. Although some stray ships were occasionally picked off, the Treasure Fleet was only fully captured one time despite the many attempts by Europeans to do so. This was done by the Dutch Privateer Piet Hein in 1628 and nearly bankrupted Spain. He is still somewhat of a folk hero in the Netherlands.
As to how Spain invested their wealth, the answer is not very well. After forcibly removing 150 000 Jews and many other minorities like Muslims, they were deprived of intellectuals who would make good bankers and such. The remaining people were offered a choice to either become Catholic or leave (Bartolomé de las Casas, the famous priest who came out against encomienda, was only Catholic because his parents converted during this time.) Due to this, Spain had to go to other European nations to run things like finance. Spain became so reliant on the other Europeans that they controlled only 5% of trade with their own colonial possessions. Latin American became a European business and not just a Spanish business. Other Europeans owned 90% of the silver that came through Spain and the state had to spend 65% of royal revenue to pay off debt. What can be concluded is that Spain owned the cow, but others drank the milk.
Sources:
Spain's Road to Empire: The Makings of a World Power, Henry Kamen
Open Veins of Latin America: Five Centuries of the Pillage of a Continent, Eduardo Galeano
Going off of this question, I heard that inflation from all the gold and silver coming into Spain from the New World caused their economy to collapse. Is this true and when can we see this happen?
This is a tough question because colonization was privately organized and financed. The royal treasury did not finance expeditions. The conquistadores were not a standing army nor were they paid by the king. The major financial outlay for the Spanish empire was in paying the bureaucracy that was established in the decades following the conquest. Additionally, the crown paid some conquistadors a pension for services rendered but these were frequently paid out of accounts that drew from native tribute and by the end of the sixteenth century those revenues had dropped leading many pensioners to receive nothing (the pensions were explicitly linked to the availability of native tribute). The royal revenue in extracted gold and silver (much more plentiful than gold) was based primarily on the 'king's fifth'. Castilian law held that the crown owned all subsoil rights, in return for authorizing mining operations miners were required to grant the king one fifth of all they extracted. Finally, revenue was collected through taxes on trade and commerce, including a basic sales tax, import taxes, royal monopolies on specialized goods (tobacco, mercury, etc.) licenses to import slaves, and, overtime, income from the sale of bureaucratic offices. The Spanish crown also benefited from the patronato real (right of royal patronage) which allowed them to manage the finances of the church including the collection of tithes (although it was also responsible for the maintenance of ecclesiastical property and salaries).
To the second part of the question, the finances of the empire were such that revenues frequently did not surpass outlays (particularly in military spending in Europe during the 16th and 17th c.). The overall economic management of the empire was much more 'modern' than most people understand. Just like today we use complex financial instruments including debt/credit arrangements to finance government so to did the Spanish empire rely on similarly complex arrangements. That said, the Spanish empire never really went bankrupt. Their cash flow was sufficient that most creditors allowed renegotiations of loans to accommodate the needs of the Spanish government.
For further reading check out Restall's Seven Myths of the Spanish Conquest see also the old but still very good Lockhart and Schwartz Early Latin America