Heavier elements are created in stars. After stars die they scatter these heavier elements throughout the universe. These elements eventually gather to form planets. But why do we find "chunks" of gold, silver, etc. and not scattered atoms throughout the earth. In other words, how do the atoms of these elements come together to form chunks of the same element involving billions and billions of atoms?
First of all, Earth is not a random assortment of atoms. While it probably formed along like that in the beginning, somewhere along the way it differentiated into distinct core, mantle and crust, which are not chemically the same. That's a story for another question though, and there is an excellent answer to it on this site.
Back to your question, Why are there ore deposits?
So in addition to the Wikipedia quote given by farrenthorpe, here are some more (hopefully easily digestible) points:
Chemical elements posses differing properties. Even if you take a random mix of all elements in the periodic table, each and every one of them will have different properties.
Imagine a homogenous pile of gold and salt. Now, start pouring water over it, let it flow to a specific place and wait until the water dries and evaporates. Exploiting the different chemical properties of Au and NaCl, you've created two "ore deposits", one of gold and the other of salt. In the Earth, there are a multitude of processes resulting from all kinds of combinations of temperature, pressure, fluid chemistry, magma processes and more, that facilitate selective concentration of certain elements over other elements.
The simple answer is that the Earth is dynamic, e.g. plate tectonics. This wikipedia article on ore genesis is a good place to start, http://en.wikipedia.org/wiki/Ore_genesis .
Ore genesis theories generally involve three components: source, transport or conduit, and trap. This also applies to the petroleum industry, which was first to use this methodology. Source is required because metal must come from somewhere, and be liberated by some process. Transport is required first to move the metal bearing fluids or solid minerals into the right position, and refers to the act of physically moving the metal, as well as chemical or physical phenomenon which encourage movement. Trapping is required to concentrate the metal via some physical, chemical or geological mechanism into a concentration which forms mineable ore. The biggest deposits are formed when the source is large, the transport mechanism is efficient, and the trap is active and ready at the right time.