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.
To mine a rock select your pickaxe from your inventory then left click on the rock you wish to mine. If there is an ore in that rock there is a chance you will extract it, provided your mining is high enough to mine that particular ore. Ore is quite hard to get out of rocks it might take quite a few attempts before you meet with success. As your mining level gets higher it will become slowly easier. Once someone has taken from a rock there will be no ore available to mine from it for a short while, wait a bit and you will be able to mine ore from it again.
Below are listed some of the items you can mine initially. Even more ores can be mined at higher levels