In an eerie fulfillment of its own worst Cold War prophecies, the Reagan administration last week suddenly found itself at a flash point with the Soviet Union or Soviet-supported movements in three separate parts of the world.

In Lebanon, U.S. Marines were under artillery and mortar attack by forces supported by the Syrians, who in turn are supported by Moscow. Four Marines had been killed, and the pressure on the administration was either to back away from the effort to shore up the Lebanese government or to increase the U.S. military presence and exposure in that volatile land.

U.S.-Soviet relations were transfixed in the meantime by the shooting down of Korean Air Lines flight 007 by a Soviet fighter near Sakhalin Island. Secretary of State George P. Shultz and Soviet Foreign Minister Andrei A. Gromyko, in Madrid to sign a new European security pact, instead exchanged recriminations so sharp that they seemed to jeopardize already faint hopes of progress on arms control and other relaxations of East-West tensions.

And in Central America, almost unnoticed in the furor over these more immediate events, the United States kicked off the controversial military and naval exercises that the administration intends as a warning to the Soviet Union and Cuba that it will not accept idly the spread of communist-aided revolution through the region.

One result of this was to put the president to a test in crisis management of a kind that he so far has avoided in his three years in office.

That test comes as a probable Reagan reelection campaign approaches. Reagan campaigned in 1980 as a hard-liner, promising to restore U.S. prestige and to stand up to the Soviets and other adversaries in every corner of the world.

More recently, responding to pressures in Congress and from European governments, he sometimes has moderated this line on arms control and trade issues; even as he was denouncing the Soviets last week, they were buying U.S. wheat under a newly renegotiated long-term grain agreement, and recently there was talk in the White House of a U.S.-Soviet summit next year, election year.

It is, therefore, an especially complicated time for the president in foreign affairs. These are the problems he must confront:

* Lebanon. The renewal of violent civil war between Lebanese religious and political factions has caught the Marine detachment there in a crossfire that in two weeks has left four dead, raised an outcry in Congress about whether the president is violating the War Powers Act and reopened the question of whether the United States should keep a military presence in such a country and under such constraints.

To withdraw the Marines would mean retreat from the administration's goal of stabilizing the Lebanese government of President Amin Gemayel. It also would weaken U.S. credibility in the Arab world and, U.S. officials say they fear, open the way for the Soviet Union and its radical Arab allies such as Syria to extend their influence through the region.

But the choices available to Reagan strike U.S. policymakers as equally unenviable.

To pull out could mean the downfall of Gemayel and the consignment of Lebanon to partition and chaos. To keep the Marines there in their present force and role presumably will leave them open to further attacks.

Yet to increase the Marine force and give it more aggressive orders would put it in a combat role and almost certainly touch off a major new debate in this country over the U.S. role as world policeman.

Administration officials say privately that Reagan is determined not to be forced out of Lebanon. Instead, they add, his most likely course is to keep the Marines there, use whatever force is necessary to discourage further attacks against them and scale down the administration's previously ambitious hopes for Gemayel.

That would mean giving up for the present the idea that Gemayel can control the entire country, and concentrating instead on helping him retain his foothold in the Beirut area. If that can be done, U.S. officials argue, there still would be hope eventually of inducing Syria and Israel to withdraw their forces and of bringing Gemayel and his domestic foes together in a new power-sharing arrangement that would restore peace.

However, the officials concede, that is a long-shot scenario that will take months to play out, and in the interim, the United States will have to accept the likelihood of further Marine casualties.

The question is whether Reagan can display sufficient leadership to persuade Congress and the American public to go along, and the officials expect the answer to start becoming clear this week when an anxious Congress reconvenes and starts to ponder the Lebanon question.

* U.S.-Soviet relations. The U.S. response to the shooting down of the Korean jetliner, with the loss of 269 lives, is described by administration officials as reflecting Reagan's view that the Soviet regime, while ruthless and even evil, also is a superpower with which the United States must probe cautiously and persistently for accommodations in the interests of preventing a nuclear holocaust.

In practice, that has boiled down to more words than deeds. While deploring the heinous nature of the Soviet act, Reagan has ruled out such steps as reimposing the grain embargo or calling off the U.S.-Soviet talks on reducing nuclear missiles. Instead, he has imposed a few relatively minor sanctions in civil aviation.

That was a keen disappointment to the hard-core anti-communist conservatives who are Reagan's political base. But the administration appears confident that, despite their grumbling, they will stay hitched because they have nowhere else to go.

In choosing his course, Reagan was motivated instead by several other political and diplomatic considerations. A grain embargo would have enraged U.S. farmers and put Reagan in the position of breaking his campaign promise to end the earlier embargo imposed by President Carter. Similarly, administration sources concede, the president was aware that any resort to trade and financial sanctions would require a kind of international cooperation that other countries are unwilling to provide.

In arms control, the administration also was on notice that America's NATO allies are fearful that any sign of flagging U.S. interest in accommodation with the Soviets will fuel the anti-nuclear movement in Europe just as the alliance is preparing to deploy new medium-range U.S. missiles there at year's end.

But, while the U.S. response was short on substance, its rhetoric, as exemplified by the blunt exchanges between Shultz and Gromyko in Geneva, has led U.S. officials to warn privately that whatever chances may have existed for progress in arms control and other areas such as cultural and scientific exchanges probably are going to wind up on the shelf for some time to come.

Some officials noted that the acrimony evident between Shultz and Gromyko in Geneva had not been seen in the many face-to-face meetings held by senior officials of the two governments in recent years. As a result, they said, it is not even clear at this point whether the two will go ahead with their expected meeting at the U.N. General Assembly in New York later this month.

Instead, the expectation is that the two superpowers, while conducting business as usual on existing agreements such as grain sales, will enter Reagan's final year in office with their already strained relations in a nearly glacial state. It also is expected that opponents of Reagan's anti-communist rhetoric, faced with the unregenerate Soviet attitude on the airliner incident, will be inhibited from calling too loudly for greater flexibility toward Moscow.

* Central America. Earlier in the summer, the decision to conduct the largest U.S. exercises in history in Central America and the Caribbean had touched off a storm of fresh anxiety about whether the administration was getting on a collision course with Cuba and Nicaragua that would mean increased U.S. involvement in that region.

In fact, it seemed at the time that the controversy sparked by that move would give Central America pride as the major issue of next year's presidential campaign. Instead, it now seems destined to share that spot with Lebanon and U.S.-Soviet relations.

Still, although recent events have turned public attention to the other two areas of contention, Central America has been the hardy perennial of controversy in the Reagan administration, and U.S. officials expect that it will be only a matter of time before it bursts into the foreground again.

All of the elements that have raised doubts about the administration's approach still are there: concern that the United States should put more emphasis on negotiations rather than seeking a military solution to the El Salvador war, uneasiness about the human rights record of U.S.-supported governments in El Salvador and Guatemala, opposition to covert U.S. support of anti-government guerrillas in Nicaragua and fear that the administration's course inevitably will mean putting American troops into a shooting war.

There already is concern that the newer troubles being confronted by Reagan will have an impact on the Central American situation.

Some opponents of the president's policies fear that he will try to capitalize on the anti-Soviet feeling stirred by the Korean plane incident, citing it as proof of the need to combat communist ruthlessness in the Western Hemisphere.

And many who have fought against an increased U.S. military involvement in El Salvador are worried that if the president persuades Congress to permit an extended Marine presence in Lebanon, a precedent will be set that the administration might later try to apply to Central America.