Prospecting is learned from the JC trainer at skill lvl 20.
You have to be a certain JC skill lvl to prospect each type of ore. The only one I know for sure is prospecting Mithril requires 175 JC.
You have a chance of getting a gem. My one and only prospect of Mithril produced Mithril Dust (gray quality) ftl.
Cheers!