Layers in a sedimentary rock are created over time, as older rock is covered by new rock or mineral matter that has been moved by weathering or erosion or by organic material from living plants or animals that have died. The depth of a layer is determined by the amount of matter that is deposited and compressed into the sedimentary rock. Carbon 14 dating can be used to determine the age of the organic sediment, thus allowing for determination of the age of a given layer in a sedimentary rock formation. A layer of sedimentary rock is usually created over a very long period of time.
Rings in a tree are created by the yearly cycle of different types of cells in different seasons. Cells produced in the spring are very different from cells produced in the summer, and few or no cells are produced in the autumn and winter. The differences create the appearance of rings, with one ring for each year of growth. It is possible to count the rings of a tree and determine its age; observing the width or narrowness of a ring gives an indication of the growing conditions during that given year.
Layers of sedimentary rock could be seen as representing "growth" in terms of increased size of the rock and increasing age of the formation. As a tree forms a new ring every year, its trunk becomes larger in girth, and the new ring represents another year of life for the tree.