In the base case, we have an economy with $10, and 5 apples. If all of the money is spent on all of the goods, then the price of each apple will be $2 (this is determined through components of supply and demand to get market equilibrium).
What if now the money supply increases to $12? Then there is more money in the economy, but the amount of goods to spend it on hasn't changed. This means that
the price of each apple must go up, in order for the additional $2 to be used. This increases the price of each apple to $2.4, and thus prices go up, or we experience inflation.
The example above assumed a stagnant, or non-growing economy. To be more realistic, as long as you print just enough money so that it replaces lost or destroyed money plus new money to account for growth in the economy, then its value will not go down.
The reason that the value of money goes down (inflation), is because money supply growth is larger than the amount replaced, and needed to compensate for economic growth.
Here's another example with the growth principle: think of a small economy with 10 trees, and each tree sells for $1, we would need $10 in the money supply right? Imagine growth added 1 tree, but the money supply grew by $2. We now have $12 to buy 11 trees, or about $1.09 per tree.
In summary: if the amount of money grows by more than the amount of stuff we can buy, then its value will go down.