Depositional environments are the geological environments where particular types of sediments are deposited. Geological processes will later work on these sediments to convert them into rocks (a process called lithification). There are several different types of depositional environments, but we are concerned with ones that allow for hydrocarbon accumulation. This means the formation of petroleum (oil). Oil forms from organic matter like algae and plankton that gets trapped in the sediments. As it gets buried deeper underground, the heat and pressure convert the organic matter into hydrocarbons (oil). This deposition tends to occur on lake bottoms and ocean floors. Ocean depositional environments are called marine. A lake bed depositional environment is called lacustrine.
Assuming that the rocks in a given area have not been tilted or otherwise moved around by geological action, you can see changes in the environment vertically in the sedimentary rocks. This is because of the fact that older layers of rock will be covered over with newer layers. When an excavation or a river or something cuts through a deposit, the layers can be seen in vertical order, oldest at the bottom, newest at the top.
The changes in depositional environment can be seen in the types of rock in each layer. The rocks will reveal aspects of the environment in which they were laid down. They will show what kinds of sediment were laid down, they will show some things about the types of plant life that were around at the time. They can also show what laid the various strata down.
So the changes in environment can be seen because sediment will be put down in layers that will differ as the environment changes.