A merit good is a good which has positive externalites and therefore people do not consume enough of them. For example, vaccinations.
A public good has two characterisitics, it is non-rival: this means that for any given consumption level, more people using it does not diminish anyone else's consumption and non-excludable: we can't stop people using it. An example is defence. Non-excludabliltiy means there is a free rider problem and the good will be underprovided in the market.