An externality, in economics and law, is a harm caused by one person in the course of their activities that harms another who does not receive compensation for the harm. Generally, externalities are bad for society because they cause activities to be carried out more frequently than they should because the people conducting the activity keep the benefits while making other bear the harms.
Usually, legal liability or a restructuring of the economic organization of the industry that conducts that activity are proposed to solve the externality.
The concept of an internality is an analogous concept. An internality occurs when someone engages in a non-optimal level of an activity because they are predictably incapable of ascertaining the optimum level of that activity for the person's own well being. These are the classic problems of behavioral economics. For example, people may systemically save too little for retirement because the harm is in the future, while the benefits of not saving are in the present and the future is another country. Other irrationalities are similarly more or less hard wired into humanity.
Usually, some sort of "nudge" that tweaks default rules while allowing a determined individual to exercise autonomy contrary to societal suggestions is suggested as a solution to internalities.