Describe the types of rocks and explain their formation process.