Minerals occur naturally, usually of crystalline form and abiogenic in origin. The study of minerals is called mineralogy. As for how we can tell what type of mineral we are dealing with, well that's easy. You look at the luster, hardness, streak, color gravity etc. Hope it helps