In economic terms, an "externality" is something that has an economic effect on someone that is beyond their control and is not the result of their actions. If the externality is beneficial, we say that it is a positive externality. If it has a cost, then it is negative. If one owns a restaurant in a small town and a new factory opens up there, boosting the local economy, more people will likely come to the restaurant, and its owner will make more money. The food, decor, and service (all of which are within the owner's control) will be the same, but profits will be higher. This is a positive externality.
To continue the example, imagine that, after five years of operation, the factory closes because of a decision made at the corporate level. The owner of the restaurant, despite having made no changes, will probably see profits drop, as people move from the town or have less money to spend on dining out. Because the factory's decision to shut down was totally out of the restaurant owner's control, but still costs him or her money, it is understood to be a negative externality.
We can think of other examples of externalities related to the imaginary factory. For example, the factory might pollute a nearby river, causing increased health costs for residents and hurting the local sport fishing industry. These are negative externalities. At the same time, it might provide a sizable tax base which leads to more funds to support local schools. This is a positive externality.