Coal and petroleum are fossil fuels. Tar is not a fossil fuel.
A fossil fuel is obtained from the remains of organisms. It is a natural fuel. Tar is a black mixture of hydrocarbons and free carbon. It is obtained from several organic compounds during destructive distillation. Tar can also be produced from wood, coal, petroleum or peat.