Examples of igneous rocks include basalt and granite. Sedimentary Rocks Sedimentary rocks are formed by years and years of sediment compacting together and becoming hard. Generally, something like a stream or river will carry lots of small pieces of rocks and minerals to a larger body of water.