Externalities in general are the costs or benefits of any sort of economic activity that are not felt by the entities that are actually engaged in the economic activity. For this reason, they are sometimes called “spillover effects.” They are seen as a market failure because they are not reflected in the price of the economic activity in question.
Externalities can be either positive or negative. If an economic activity has negative externalities associated with it, the government will want to discourage or regulate it. If it has positive externalities associated with it, the government will want to encourage it. In the case of drilling for oil or gas, there are both positive and negative externalities.
The negative externalities are environmental and social. For example, North Dakota in the US has experienced a huge boom in oil drilling. This has brought large numbers of young men into rural areas looking for jobs. They have lowered quality of life for people there through such things as sexually harassing local women. More conspicuously, there are environmental externalities. The drilling makes previously natural views look industrial. It can damage wildlife habitat. More importantly, it can lead to things like chemical spills and degradation of water supplies.
However, there are positive externalities as well. Drilling provides jobs. It often reduces social problems by making more people have more money. It reduces our dependence on foreign oil. There are, in short, a number of externalities both positive and negative.