Hush money is a term for an arrangement in which one person or party offers another an attractive sum of money or other enticement, in exchange for remaining silent about some illegal, stigmatized, or shameful behavior, action, or other fact about the person or party who has made the offer.
Alternatively it can be money paid to placate a disgruntled adversary who may disclose embarrassing information, even if untrue. This is to save the intended person the harm and hassle of dealing with defamation.
The person or party who presents the hush money may be attempting to avoid criminal prosecution, a lawsuit (as sometimes in the case of an out-of-court settlement), a leak of information to the news media, or silence about a stigmatized issue within one's own community. The information being covered up may include illegal activity, such as drug dealing, or some personal secret, such as an extramarital affair. In some cases, a government agency may be involved in the offer of hush money in order to protect the agency's employees, politicians and their appointees, or a national government in its standing among other nations in the world. It is usually given under the table.
Hush money can refer to money paid in exchange for a nondisclosure agreement, which can be breached under court order. It can also refer to an agreement to say a thing didn't happen that did happen, even in court testimony. The latter type of agreement can be a criminal act itself as an obstruction of justice.
The payment of hush money may or may not be illegal, depending on the circumstances.