Ostpolitik, or "eastern policy", was a controversial policy of the government of West Germany in the late 1960s and early 1970s in which it sought reconciliation with the Soviet Union and especially East Germany, initially against the wishes of the United States. It marked the settling down of the Cold War in Europe and a recognition of the fact that Germany would remain divided for some time - as it did until the final collapse of the Soviet Union and German reunification.
Germany, defeated in World War II and then split into two states after the war, faced a peculiar task in international relations. Having unleashed the Nazi war machine across Europe, West Germany placed the highest priority on making itself a respectable and dependable member of NATO for the first few decades of its existence. This meant standing firm against the Soviet Union and refusing to admit as legitimate Soviet rule over most of Eastern Europe.
It was also difficult for West Germany, one of the birth-places of European nationalism, to accept the existence of East Germany. West German politicians refused to see East Germany as a legitimate German state and instead saw it as an alien regime only held in place by the presence of the Soviet army. Their rejection of East Germany was such that they actually refused to have diplomatic relations with any country that recognized East Germany - this was known as the Hallstein Doctrine.
While the doctrine was psychologically rewarding as it allowed them to stick one to the Russkies, by the 1960s it was starting to become a bit of a problem. As it became increasingly clear that the division of Europe and of Germany was an established fact which wasn't likely to go away, more and more countries around the world were recognizing East Germany, if only so they could trade with it. West Germany was isolating itself not only from East Germany but also from the rest of the world.
The recognition of these realities gave birth to Ostpolitik. In 1969, a left-wing government came to power in Germany under Willy Brandt for the first time since World War II. Convinced that it was increasingly ridiculous for West Germany to enforce the Hallstein Doctrine, Brandt also thought that increased commerce and movement of people between the two Germanys would help to undermine the Communist regime. This hence allowed him to have it both ways - he could have relations with the East but in a way that he could argue ultimately undermined it. Everyone from business groups who were eager for new trade opportunities to student radicals who wanted a relaxation of belligerence were quick to agree.
For their part, the Soviet Union and East Germany were keen for a relaxation of tensions themselves. As a new generation grew up in the Soviet Union, one less used to the privations of war and more aware of how good life was in the West, the Soviets increasingly needed to trade with western countries to import the consumer goods that their citizens were demanding. This was also a time of great tension between the Soviet Union and China over leadership of the worldwide Communist movement, and with a possible war brewing on its eastern frontier the Soviet Union had an incentive to cool down tensions in the West.
At first the United States wasn't sure about Ostpolitik, even though at the time the Nixon administration was pursuing its own strategy of detente, an easing of tensions with the Soviet Union. Henry Kissinger worried that improved relations between West Germany and the Soviet Union might allow the Soviets to peel West Germany away from NATO. Eventually, Washington was convinced that West Germany's actions were a positive outlet for German nationalism. West Germany signed a non-aggression treaty with the Soviet Union in 1970, and normalized relations with East Germany in 1972.
The regularization of the Cold War division of Europe was psychologically painful and difficult for the Germans as it was for other Europeans, but it served a purpose. Non-aggression treaties and the recognition of each other's right to exist helped to move the Cold War from a period when there was a real risk of war between the competing blocs to a time when competition took place mainly the economic and cultural spheres. The two Germanys didn't have to like each other, but they could establish a relationship which wasn't based on the premise that they might have to annihilate their countrymen in a brutal war. When the Soviet Union eventually collapsed because it was unable to compete with the West's social and economic system, this approach had been proven right.