How to identify chemical property and structure of rocks?
What you are asking about is mineralogy,

a subject of geology specializing in the scientific study of the chemistry, crystal structure, and physical (including optical) properties of minerals and mineralized artifacts. Specific studies within mineralogy include the processes of mineral origin and formation, classification of minerals, their geographical distribution, as well as their utilization.

It is an essential part of all geology courses. Allied to this is study of how rocks form, petrology.
There is a lot to learn within mineralogy and mineralogists are a specilized group of geologists.