How Are Different Types of rocks Formed?