The Reagan administration, citing terrorist threats from Nicaragua, plans to send 20 to 24 U.S. military advisers to Costa Rica next week to train about 750 men in counterinsurgency techniques, the Defense Department said yesterday.

The significant escalation in the level of U.S. training efforts for the Civil Guard there marks the establishment of major U.S. military training efforts in all three countries bordering Nicaragua: Honduras, Costa Rica and El Salvador.

The advisers were requested by Costa Rica, which is known to be concerned about possible military incursions from leftist Nicaragua and about leftist Costa Ricans who have joined with Nicaragua in fighting antigovernment rebels along the border.

Costa Rican officials have said they also are concerned about the development of a paramilitary right-wing group inside Costa Rica that is critical of the government.

A Defense Department statement said U.S. Army Special Forces instructors from Panama are expected to arrive in Costa Rica May 15 and stay for three months, training four companies of guardsmen before returning to Panama. Officials said funding of about $1 million is to come from military assistance program money appropriated for Costa Rica this year.

Costa Rica, Central America's strongest and most stable democracy, abolished its armed forces in 1949, but its 10,000-member Civil Guard has been receiving training from small U.S. military units since late 1982, according to congressional sources.

The planned U.S. training unit would be more than three times larger than any previous one, and its student group also would be larger, the sources said.

Administration officials said there is no intent to alter Costa Rica's carefully maintained neutrality in Central American conflicts and no intent to militarize its guard force.

"We're not establishing an army but enhancing the capability of people who already exist," a senior State Department official said. "We have no intention of changing the mission or doctrine of their forces."

Costa Rican leaders frequently have complained privately that U.S. officials, including former ambassador Curtin Winsor, were pressing them to become more supportive of U.S. efforts against Nicaragua. U.S. military aid to Costa Rica has increased from $300,000 in 1981 to $9.2 million this year.

Some of that bought new M16 rifles, mortars and antitank guns that the Costa Rican unit is to be trained to use, according to State Department officials.

The new unit is to be led by 45 Costa Ricans who completed a 10-week training course at the U.S. Regional Military Training Center in Honduras that closed down in March.

United Press International quoted an unidentified Costa Rican government official as saying the advisers also are to train "an antiguerrilla commando team" to stop leftist rebels from entering Costa Rica.