I remember many years ago starting a book at my school library
I believe you're thinking of "Beachhead", a short story by Clifford D. Simak; originally published as "'You'll Never Go Home Again!'" in Fantastic Adventures, July 1951, available at the Internet Archive. The book you saw it in might have been the August Derleth anthology Beachheads in Space or the Simak collection Strangers in the Universe or, more recently, the Brian Aldiss anthology Perilous Planets.
which featured a human colony ship which had landed on a planet many centuries before with the intent to either colonize or investigate the planet.
Simak's story takes place in the weeks after the initial landing. The ship is a human survey ship:
There was nothing, absolutely nothing, that could stop a human planetary survey party. It was a specialized unit created for and charged with one purpose only—to establish a bridgehead on an alien planet, to blast out the perimeters of that bridgehead and establish a base where there would be some elbow room. Then hold that elbow room against all comers until it was time to go.
The problem was that there was something in the atmosphere which degraded metal and so their ship fell apart and the humans were never able to leave.
Waldron came into the pavilion, walking quietly in the silence. "The radio is dead," he said, "and the robots are dying like flies. The place is littered with them, just so much scrap metal."
Decker nodded. "The little stuff, the finely fabricated, will go first," he said. "Like watches and radio innards and robot brains and injector mechanisms. Next, the generators will go and we will have no lights or power. Then the machines will break down and the Legion's weapons will be no more than clubs. After that, the big stuff, probably."
"The native told us," Waldron said, "when you talked to him. 'You will never leave,' he said."
"We didn't understand," said Decker. "We thought he was threatening us and we knew we were too big, too well guarded for any threat of his to harm us. He wasn't threatening us at all, of course. He was just telling us."
He made a hopeless gesture with his hands. "What is it?"
"No one knows," said Waldron quietly. "Not yet, at least. Later we may find out. A microbe, maybe. A virus. Something that eats iron after it has been subjected to heat or alloyed with other metals. It doesn't go for iron ore. If it did, that deposit we found would have been gone long ago."
I believe there was a reptilian or insect-like native species on the planet.
In Simak's story the natives were sort of humanoid:
The native was humanoid, but he was not human.
As Waldron and Dickson had said, he was a matchstick man, a flesh and blood extension of a drawing a four-year-old might make. He was black as the ace of spades, and he wore no clothing, but the eyes that looked out of the pumpkin-shaped head at Decker were bright with a light that might have been intelligence.
It is suggested that the "natives" were not native to the planet, but were descendants of alien space explorers who had been trapped there centuries earlier.