Compare sandstone, siltstone, and shale rocks.
Sandstone, siltstone, and shale rocks all belong to the rock class called sedimentary rocks. Sedimentary rocks are all made from sediments being compacted and cemented together.
Sediment can be created from any kind of rock. The natural processes of weathering and erosion cause rocks to be ground down into smaller and smaller pieces called sediment. Those sediments are usually carried down by runoff and deposited in layers along river beds, ocean bottoms, or even valleys. Year after year more and more sediment layers build up, increasing the pressure on the bottom layers. This pressure squeezes the water out and a sort of natural cement is created as the rock layers start to stick together. You now have a sedimentary rock. The difference between sandstone, siltstone, and shale is the size of the sediment grains. All of them are considered fine-grained sedimentary rocks (vs. coarse-grained), but of the three the sandstone is the least fine and shale is the most fine (very smooth because of the extremely small pieces of sediment).