Respuesta :

They are both used for energy. 
fern, once dead (that is not living), would start to rot. When covered over and compressed, the rotting fern would turn into coal after a bunch of years

hope this helps