Mines extract minerals from the planet's core as long as one of the four minerals are present. If no minerals are present, mines are completely useless. The cost of building a mine is 4 megacredits and a supply unit. The maximum number of mines that can be constructed on a planet is limited by the size of your colonist population.
Starships and colonists can take a mining survey of the planet that will show you a graph of the amounts of minerals remaining unmined in the planets core and a listing of the amounts of ore that have been mined so far and are ready for use.
The survey will also tell you the number of mines present on the planet. The rate that your mines can extract ore out of the ground depends on the concentration of the ore.
Most planets can be mined clean in just a few turns, but planets with abundant minerals will produce minerals for a very long time. If you build a great number of mineral mines the population on the planet will unhappy and you will be forced to drop the tax rate to keep them happy or else face the risk of riots and war. Mineral mines and factories risk showing up on enemy sensors unless the planet has more than 15 defense outposts.
When there is not enough manpower on the planet to maintain structures on the planets surface the structures will decay at a rate set by host. The rate is the number of undermanned structures that can be lost in a single turn. If it is set to 3 than up to 3 of each type of structure can be lost in a single turn on a planet that does not have enough colonists to support. This applies to mines, factories and defense outposts.