How is Coal Made?

Trees from millions of years ago slowly sank into the ground and were then pressed by layers of rocks. When this all dried up it turned into peat and then eventually coal. Because it takes so long to form there are varying predictions as to when we will run out of coal to use.