General Motors Corp. yesterday reported a second-quarter profit of slightly more than $1 billion and Pan American World Airways reported its first quarterly profit from operations since the third quarter of 1980.

U.S. Steel Corp., however, reported a $112 million second-quarter loss, down from a $4 million profit a year ago. The nation's No. 1 steelmaker said its Marathon Oil subsidiary turned a profit and its other businesses were "marginally profitable."

GM's second quarter results were up from a $560 million net income in the same period last year. Per-share earnings for the 1983 second quarter were $3.32, compared with $1.82 for 1982 second quarter.

Pan Am, citing a 21.4 percent drop in fuel costs and an increase in passengers, said its second-quarter net earnings rose to $10.4 million or 13 cents a share. Last year, the company reported a second-quarter net loss of $56.2 million, including a $14 million gain from the sale of tax benefits.

GM Chairman Roger B. Smith and President F. James McDonald said the performance reflected the momentum of an accelerating economy and the efficiency of GM operations. They said the company's profitability also resulted from improvements in the quality of its products, which was shown "in the strong customer acceptance of 1983 model cars and trucks."

GM said sales of vehicles to dealers in the second quarter of 1983 totaled 2.05 million units, a 12.1 percent increase from the second quarter of 1982. Dollar sales for the 1983 second quarter were 13.2 percent above the similar period a year earlier.

For the first six months of 1983, GM's net income was nearly $1.7 billion ($5.40), up from $688 million reported in the first half of 1982 ($2.23). Per share earnings were $5.40, up from $2.23 per share in the first six months of 1982.

The company said sales of all products totaled $19.4 billion in the 1983 second quarter, up from $17.4 billion in the similar period a year earlier. For the sixth-month period, sales were $36.1 billion compared with $31.8 billion in 1982. Smith said the April-to-June period was GM's fifth best quarter ever and represented the company's highest quarterly earnings in four years.

In the United States, Smith said second-quarter retail activity was highlighted by "an enthusiastic response" to the 1984 Chevrolet Corvette, introduced nationwide in April. He said dealers reported strong sales of Chevrolet Cavalier, Pontiac 2000, Oldsmobile Firenza, Buick Skyhawk and Cadillac Cimarron models, as well as light-duty, specialty trucks.

Pan Am said its operating profit for the quarter rose to $49.7 million, the company's largest quarterly operating profit since the third quarter of 1979 and $90.9 million over the $41.2 million operating loss reported in the second quarter last year.

Consolidated operating revenues fell 2.4 percent to $946.2 million from $969.5 million reported last year, the airline said.

Pan American said its operating revenues from passenger services rose 2.5 percent to $738.8 million from $720.5 million.

Gerald L. Gitner, Pan Am executive vice president of finance, said that since the second quarter of 1982 the airline has instituted service in a number of new markets, "markets that are intended primarily to provide traffic from interior points to the airline's long-haul overseas operations."

Fuel and oil expense during the quarter fell 21.4 percent to $236.2 million from $300.7 million last year, largely because of a 12.2 percent reduction in the amount of fuel consumed during the quarter and a 10.3 percent drop in the average fuel price. Fuel cost the airline an average 96 cents a gallon compared with $1.07 a gallon last year.

For the first half, Pan Am recorded a net loss of $69.3 million compared with a net loss of $183.5 million in the same period last year. Consolidated operating revenues for the six months fell 2.1 percent to $1.784 billion from $1.823 billion.

For the first six months of the year, Pan Am showed an operating profit of $15.2 million--the first time the airline has reported an operating profit in the first half since 1979--and a $156.5 million improvement over the operating loss of $141.3 million reported in the first half last year.

U.S. Steel said that, despite its net loss, its second-quarter operating income rose to $163 million--a $369 million improvement over the first quarter--due to cost cuts in its steel operations and improved results in oil and gas.

On a per-share basis, the giant steelmaker lost $1.25, compared with a year-ago gain of 5 cents. The company's sales fell to $4.4 billion from $5.1 billion.

For the first six months of this year, U.S. Steel said it lost $230 million ($2.56) on sales of $8.2 billion. That compared with a profit of $84 million (92 cents) on $10.1 billon sales a year earlier.

U.S. Steel said it lost $141 million on its steel operations in the April-to-June quarter--the lowest loss since early 1982 and an improvement over the year-ago loss of $186 million. The steelmaker's mills ran at 48.3 percent of capability in the 1983 quarter, up from 33.8 percent in the 1982 period.

Demand for the company's steel products probably won't pick up until late 1983, said Chairman David Roderick. But he said "improvements at Marathon should continue through the last half of the year." CAPTION: Picture, GM Chairman Roger Smith is all smiles while announcing earnings of more than $1 billion. He said retail activity was marked by response to the '84 Chevrolet Corvette. AP