Shale is a fine-grained, clastic sedimentary rock composed of mud that is a mix of flakes of clay minerals and tiny fragments (silt-sized particles) of other minerals, especially quartz and calcite. The ratio of clay to other minerals is variable. Shale is characterized by breaks along thin laminae or parallel layering or bedding less than one centimeter in thickness, called fissility. Mudstones, on the other hand, are similar in composition but do not show the fissility.
Clays deposit in stream and rivers but will create thicker layers of shale (after diagenesis) in floodplains, river deltas or lakes. With the right amount of organic matter (TOC) and burial history, shale deposits organic matter (or kerogen) can turn into exploitable hydrocarbons.
Shale deposits have a lower porosity and permeability than sandstones. They need to be fracked to release their hydrocarbons (oil or gas). A practice called unconventional oil and gas exploration and production.