The mining skill is used to get ores and metals from rocks. The ores can then either be sold or made into different objects using the smithing and crafting skills. To mine, the only object you will need is a pickaxe. These can be bought at the axe shop in Lumbridge for 1 gold coin. Rocks can be found at the various mining sites in the RuneScape world.
If you right click on a rock, you will get the option to prospect it. When you successfully prospect a rock, you will be told what sort of ores you are able to mine from it. Sometimes you will fail to find the ore, so you may need to try prospecting the rock several times to make sure there really is nothing there that you can mine. If your mining level is too low to mine an ore you will not be able to successfully prospect for it either.
Mining is a fatigue skill which means as you mine your character will slowly tire and eventually need to find a bed to rest on. Eating food will also reduce your character's fatigue slightly. For more information on fatigue please see our fatigue guide.