My history book claims that the flow of Silver from the New World to Spain in the 16th century contributed to an inflation. However, that seems very unintuitive. How could gaining resources lead to a worse economy? The only explanation I could think of is that the sellers in markets knew that people had more money (silver) so they could charge higher prices. However, I still don't understand, because this would mean all exports are bad, because they bring in outside wealth.
Quite simple really, and basic economics:
More money circulating in the economy, combined with no comparable increase in things to do with that money, leads to an increase in prices.
And as the Spanish government used the bulk of that silver to coin money to pay for their wars, the amount of money in the hands of people in Spain increased dramatically. If there's 10 people offering 1 pig each on the local market, and there's 10 potential customers, each of which has 1 ounce of silver to pay for it, the most a seller can charge for a pig is 1 ounce of silver.
If there's 10 pigs on offer and 100 people each of whom has 10 ounces of silver, the price of a pig can go up to 10 ounces of silver and he's still likely to sell that pig.
That's how you get inflation (and yes, I know this is overly simplified, in reality there are of course other factors in play, as the farmer is himself a customer and his cost to raise that pig also changes, but that works along the same mechanism).
@jwenting is correct. Inflation is defined as an increase in the money supply uncoupled from an increase in the means of production. One crucial distinction is important - you asked about an increase in "resources" - silver is specie/currency, not a simple resource.
Adding specie to a market will always cause inflation. @lohoris argues that this is true only in a closed economy. I'm not convinced that I understand @lohoris' argument, but to the extent that I do, trade flows (import export) will only moderate the effect by "exporting" inflation. If the surge in specie is dramatic enough, and the trade flows are small enough (as a proportion of the economy), then the impact of trade flows is not relevant.
I'm not an expert in Spanish history (Spain seems to have some peculiarities that are not common to the rest of Europe), but my understanding is that the increase in specie was actually coupled with a decrease in the efficiency of labor - the colonies added a tremendous amount of potential labor that was organized in a way that was effectively slavery, while the existing labor was diverted away from production/capital deepening towards speculation. As I say, this is not a period I've studied deeply, but if this summary is correct, it would only worsen the effects of inflation.
BBC History magazine's podcast this week has a section on finance which deals with this - the Kwasi Kwarteng points out that Spain lacked the financial institutions that might have helped them to deal with the influx of specie. If you're interested, I think his book is War and Gold
Spain was the first to experience a high rate of inflation that swept across Western Europe in the 15th-17th centuries known as the Price Revolution. The inflation rate was about 1-1.5%. The upper estimates are 3.3%. So to answer the question, it seems counterintuitive, because these rates are not high by our standards, but since the inflation rate had been effectively 0% for 300 years, it had enormous impacts to economies and societies which were ill-prepared. One of the main reasons for this inflation was the importation of American gold and silver, which entered European markets in large amounts through Spain, but it is not the only reason.
As mentioned in the question, increasing the money supply increases inflation. It does this by decreasing the value of the currency. It will buy fewer goods. Silver was also being mined within Europe, thus further increasing the amount of the metal.
The other element of monetary inflation is the velocity of the currency. Silver that is sitting in banks or used to trade for goods is not increasing the inflation rate. Spain traded most of its American silver for goods with the Chinese or Ottoman Empires. Over time, these empires also saw increases in inflation and after that point would not be places that Spain could "export" its inflation. The velocity of the currency was increased during this time period due to urbanization. More people were being paid in currency and using currency to trade for manufactured goods causing the money to change hands more quickly.
Inflation may also not be caused by the currency, but by unmet higher demand for goods and services. The end of the Black Death increased population rates thus increasing demands for goods. The beginnings of the process of urbanization and industrialization saw fewer agricultural workers than may have been ideal and inflation in food prices. Peasants lost traditional rights to common lands and were required to pay rents. There was increased demand for new manufactured goods. Overall, living costs increased around six fold over a 150 year period.