* Oil is not formed within the rock. Oil is formed over millions of years from the remains of tiny marine organisms that were buried under layers of sediment. This sediment eventually turns into sedimentary rock, like shale.
* The rock acts as a reservoir. The sedimentary rock, often a porous type like sandstone, traps the oil within its spaces. These spaces are called pores.
* A seal is needed to keep the oil in place. An impermeable layer of rock, like shale, sits above the reservoir rock, preventing the oil from escaping.
So, it's not something *hidden* within the rock itself, but rather a substance that was formed elsewhere and is held within the rock's structure.
Think of it like this: Imagine a sponge (the porous reservoir rock) soaked in oil. The sponge itself isn't oil, but it holds the oil within its structure. The oil is trapped because a waterproof plastic wrap (the impermeable seal) is covering the top of the sponge.