A pact is a type of agreement which different parties might make with one another. The exact meaning of a pact might vary depending upon the context in which the pact is made. Pacts are generally made between two different parties or entities such that a pact might be made in an international context between two or more nations, or a pact might be made in a domestic context between two or more organizations within a single nation.
A pact in the legal sense refers effectively to a kind of treaty or other binding document to which the different parties agree to conform. Thus, pacts are effectively a kind of codified promise.
There are many important pacts which have cropped up throughout human history, although most of them which fit the modern understanding of pacts are from the 20th Century. For example, one such pact was the Tripartite Pact, which was the pact that established an alliance between Japan, Germany, and Italy in World War II. This pact thus ensured the mutual cooperation of these countries in their war efforts and in other spheres.
Another important pact was the Molotov-Ribbentrop Pact, which was formed around the same time in 1939. This was a non-aggression pact between Germany and the Soviet Union which was designed to ensure that the two powers would not come into conflict. This particular pact was actually a full treaty, thus showing part of the conflation of pacts and treaties.