How do mining companies make money?
By developing and/or extracting and selling mineral resources.
Small and medium size mining companies usually try to find mineral deposits that might be economic. Once found, they do some geological work on them to expand the knowledge about the mineral prospect. If the prospect looks favourable enough to actually create a mine, they will usually try to sell it to a larger mining company for further work.
Larger mining companies will buy mineral prospects from smaller companies, or prospect from in-house geological experts and try to raise capital (investment money) to actually set up a mine. This can cost billions of dollars just to set up a mine. Once they start mining, the ore is concentrated, and refined into metals like copper, zinc, or gold and sold on the open market. To be profitable, the company must have a higher return from selling the minerals than their total expenditures by at least 10-20% (actual amounts vary company by company).