What is the difference between a demerit and a merit good?

A merit good has two characteristics:
People do not realise the true personal benefit. For example, people underestimate the benefit of education or getting a vaccination.
Usually, these goods also have a positive externality.
Therefore in a free market, there will be under consumption of merit goods.
A demerit good has two characteristics:
A good which harms the consumer. For example, people don’t realise or ignore the costs of doing something e.g. smoking, drugs.
Usually, these goods also have negative externalities. If you smoke you harm yourself, but also the smoke negatively affects other people.
Therefore in a free market, there will be overconsumption of these goods.