The Cold War lasted for about 45 years, from around 1946 until the fall of the USSR in 1991. It was an attempt by the United States and NATO allies to contain Soviet aggression and, later, the spread of communism.
During the Cold War, tensions were high between the two sides, but tensions never escalated into a shooting war -- except on a small scale through proxy countries. Both sides, however, armed heavily, with the philosophy that "mutually assured destruction" in the case of war would deter either side from attacking openly. Ultimately, a series of revolutions against communism, primarily in Europe, caused the fall and dissolution of the USSR, ending the Cold War.