The law of supply and demand primarily affects the oil industry by determining the price of the "black gold." The costs and expectations about the costs of oil are the major determining factors in how companies in the industry allocate their resources. Prices create certain incentives that influence behavior; this behavior eventually feeds back into supply and demand to determine the price of oil.
For example, extended periods of high oil prices lead to consumers shunning vehicles that are not fuel-efficient or reducing their driving. If utilities cost more, businesses and individuals may pay more attention to conserving energy. These factors reduce demand.
On the supply side, high oil prices lead to more drilling projects; more research money pours in and sparks innovation in new techniques and efficiencies; and many projects that were not viable at lower prices become viable. All of these activities increase supply.
A low oil price creates the opposite set of incentives. Production drops as many companies in the oil industry may declare bankruptcy and projects in development are shut down; this crushes supply. Demand also rises as people drive more and focus on efficiency matters less materially because of lower energy costs.
An example of high price influence was seen between 2007 and 2014, a period in which the cost of crude soared above $100 for the most part. Massive investments poured into the sector via credit and new companies. Production increased in response to high prices, especially with innovations in fracking and oil sands. These investments could only be justified based on high oil prices and contributed to record supply in 2014.
But the high cost of oil also led to great strides in efficiency and alternative energy, which contributed to decreasing demand on a per-person basis. In the summer of 2014, there was a deflationary shock due to economic weakness in China and Europe. Given the supply and demand dynamics, oil prices cratered, falling more than 50% over a four-month time frame.