According to Doran Routhe, a famous United Powers League scientist, planetary systems beyond Sol could contain new resources that could benefit a resource-depleted Earth. Although the terran colonists went beyond their intended destination, Routhe's theories were proven correct, the Koprulu Sector featuring deposits of crystal-minerals, often found in clusters and sometimes as veins of ore in mountains or located under regolith, in which case resonators provide a means of detection.
Terrans and protoss melt these minerals down to create the armored hulls of starships, vehicles and personal armor. Even the zerg require minerals to harden their carapaces and develop strong teeth.
Extraction of minerals take time to gather and specilized equipment/abilities found on SCVs, probes and drones is required to extract them. However, terrans have also developed automated mineral extraction processes when found as ore veins in mountains.