Here is your answer
Rocks break down as they interact with air and weather - Weathering
Density differences and other factors cause metals to concentrate in igneous rocks - volcanic activity
Seawater heats up from contact with hot rock, metals dissolves in it, the water rises and contacts cooler water, causing metals ores to settle on the ocean floor - hydro thermal energy