Why do scientists find different fossils in different rock layers?

Different organisms live at different depths underground?