A pterodactyl was a type of reptile. They were sharp-teethed, had a distinct shriek, and were capable of stationary hovering in the air.
In 2269, a landing party from the USS Enterprise encountered several robotic pterodactyls on the Shore Leave Planet. As no member the landing party had thought about pterodactyls, this was a further indication of a malfunction in the planet's master computer. (TAS: "Once Upon a Planet")
While they clearly look like members of the order pterosaur, none of the animals shown in "Once Upon a Planet" actually appear to be a pterodactyl. The crested, tailless one on the left appears to be a Cretaceous period pteranodon, and the long-tailed one on the right seems to be an earlier, Jurassic species, possibly the ramphorynchus.