The study of the origin, composition, and structure of rocks, including igneous, sedimentary, and metamorphic rocks.