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.