Oil is forced out of the earth during the primary recovery process due to:
natural pressure build-up inside the Earth.
High pressure is built-up in the oil well due to layers of rocks above them. When a well is dug, it releases oil under great pressure. This is similar to air being released when a balloon is punctured.