Say two people are trading something, like one person is buying a bike form a company. If something, either positive or negative, is made that effects a third party, say to make the bike you have excess waste after the process is done and you just dump the waste in some random spot. That is an externality, now wether it is positive or negative is dependant on weither or not that substance that was made after making the traded good, was good or bad. The goverment tries to regulate this because too much of these externalaties can cause in major damage to the third party. Like dumping waste into a river or after making something too must gold was made as an extranality in the process (Gold prices would go down).