Coal is an organic sedimentary rock due to the fact it is created from the remains of plant and animal material. Organic rocks form as the result of accumulating debris from plants and animals. Over time organic material will break down leaving mostly carbon behind. Pressure and heat will transform the remaining carbon into coal under the right conditions. The process occurs most frequently in areas with shallow water where organic debris collects. As sediments cover the debris it traps them protecting them from decomposition and they are then able to change form due to pressure. Like all sedimentary rocks the process involves material layering on each other over long periods of time.
Millions of years ago the Earth was warmer and wetter. As it dried the organic deposits left behind eventually became coal. This is one of the reasons that much of the coal is found on land. It was the result of ancient forests, swamps, and bogs eventually becoming covered then transforming into the critical fossil fuels that are used today. As plants and animals died their remains sunk to the bottom and became covered by layers of debris. This process is also seen in oceans where bones and shells accumulate on the ocean floor. Millions of years from now areas that are currently heavily forested and swampy will likely be the coal beds.
Coal gets its unique charcoal color as a direct result of the high level of carbon left behind in the rock. All of the coal used today is the result of organic material that lived on Earth millions of years ago. As organic material is exposed to heat and pressure it undergoes changes in composition and properties. First it breaks down into a peat and there are many examples of peat bogs around the world. Peat is simply carbonized organic matter that has not hardened into a rock form. The carbon content is about 60 percent in this form. After enough time further concentrations of carbon occur and rock begins to form. The highest grade coal is made up of close to 90 percent carbon.
The reason that fossil fuels such as coal are non-renewable is the life-cycle that it takes to create them is millions of years. As a result they are being used far faster than they could ever be replaced naturally. Organic sedimentary rocks have become the basis of the modern economy and it all started with organic material changing with pressure and heat.