Hard pegs are explained as part of the entry Currency Peg, which covers how countries tie their money to another currency and the range of arrangements they use. This page gives a short definition and explains how a hard peg differs from a soft one.
A hard peg is an exchange rate arrangement in which a country commits, often through law or an institutional structure, to keep its currency fixed against an anchor such as the US dollar or the euro, with little or no room to change the rate. The firmest forms are dollarization, where a country simply uses another nation's currency, and a currency board, where every unit of local money must be backed by reserves of the anchor currency. Hong Kong's link to the US dollar, run as a currency board since 1983, is a well-known example. Membership of a monetary union is sometimes also counted as a hard peg.
A soft peg, by contrast, fixes or manages the rate but allows the central bank to adjust it, as with a crawling peg or a band. Hard pegs give more credibility and protect against sudden devaluation, but they remove the ability to set independent interest rates. In crypto, the phrase is sometimes borrowed for stablecoins with strict one-to-one redemption, a different mechanism from a national fixed exchange rate.