Rocks can be sedimentary, igneous, or metamorphic. Sedimentary rocks form from soil and silt carried and deposited by moving water. Over time, the accumulated deposits compress and harden. Igneous rocks form from eruptions of lava or magma. Metamorphic rock is formed by great pressure far below the Earth's surface. Layers of volcanic ash are igneous deposits, while layers of rock these deposits surround are usually sedimentary. Several methods are used to date these layers.
Igneous intrusions form when magma breaks through a layer of rock from beneath, or lava flows down from above. They can permeate layers of sedimentary rock. When igneous intrusion causes newer sedimentary layers to sink into older ones, it's called subsidence. When they break and engulf chunks of sedimentary rocks, it's called stoping. The sedimentary chunks are called xenoliths. The original rock layers around subsidence areas are called wall rocks and the layers that xenoliths came from are called parent rocks.
One way to find the age of a xenolith or subsidence area surrounded by volcanic debris is to correlate its layers with the layers of wall or parent rocks. Stratigraphy is the study of sedimentary rock layers. According to the law of superposition, as long as an area remains undeformed by outside forces, the deeper you go down through the layers of rock, the older they are. So, if you know the ages of the layers in the parent and wall rocks, you can calculate the age of the layers in your subsided area or xenolith by matching them.
Another way to date an ash-surrounded rock layer is by identifying the geologic era of the fossils it carries. Life arose on Earth approximately four and one-half billion years ago. From the Precambrian to the present, each geologic era is associated with characteristic fossils. By identifying the species of the fossils, you can calculate the relative age of any rock layer that contains fossils. This is called relative dating. However, it only gives a rough range of possible ages, since each geologic era spans many millions of years.
Frosting in the Volcanic Cake
Some rock layers are surrounded by volcanic debris, or tuff, in situ, meaning they weren't broken by igneous intrusions; rather, local volcanic activity simply blanketed an area with ash at various times. These areas are the easiest to date because volcanic debris can usually be radiometrically dated with a high degree of accuracy. Dating the ash layers above and below a sedimentary rock layer to determine its age is called bracketing. Radiometric dating uses the decay of unstable isotopes -- atoms with specific electrical charges -- to calculate something's age. Tuff radiometry usually uses potassium-argon dating. Volcanic debris contains feldspar crystals, full of an isotope called potassium 40. Potassium 40 decays into argon 40 at a predictable rate over enormous spans of time. If you know this rate and you know the proportion of potassium 40 to argon 40 in the surrounding ash, you can estimate the age of the surrounded rock layer.