From the Super Mario Wiki
“His huge teeth will dissuade you from roll attacks!”
Klaptraps are Kremlings that originated in Donkey Kong Country. They are small, four-legged crocodilians with large mouths, hence their name. They cannot be defeated by a front attack, but they are vulnerable to a stomp. They come in blue, red, and green varieties. Klaptraps may be based off Snapjaws, crocodilian enemies Mario would send after Donkey Kong Jr. in the game Donkey Kong Junior.
Donkey Kong Country / Land series
Donkey Kong Country
In their debut game, Donkey Kong Country, the regular blue Klaptraps are common enemies that can be easily avoided. They even pass harmlessly under Expresso the Ostrich's tall legs, allowing he Kongs to avoid them entirely when riding their Animal Buddy.
Purple Klaptraps also appear rather frequently on the stage Loopy Lights, and also in a bonus level in the stage Trick Track Trek. These Klaptraps will always jump at the same time that the Kongs try to jump, which makes them more dangerous than the normal blue Klaptrap.
Klaptraps never appeared in Donkey Kong Country 2: Diddy's Kong Quest, nor in Donkey Kong Country 3: Dixie Kong's Double Trouble!, instead being replaced by their relatives, Klampon and Krimp, respectively.
Donkey Kong Land
Klaptraps later appear in Donkey Kong Country's semi-sequel Donkey Kong Land. Klaptraps are relatively unchanged in this appearance aside from being monochromatic due to the Game Boy's graphical limitations.
An individual Klaptrap (parsed as "Klap Trap") appears as an antagonist in the Donkey Kong Country novel. An employee of the Kremling factory, Klap Trap has a small chat with his coworker Zinger about King K. Rool's absence at the site and he then notices that the Kongs are eavesdropping on them. Klap Trap lunges at the group, but Diddy Kong defeats him by doing a cartwheel. The Kongs destroy the factory shortly after.
In the Donkey Kong Country animated series Klaptraps are, instead of soldiers, ammunition for a weapon called a Klap-Blaster. Unlike the Klaptraps of the games, the ones on the show are capable of speaking. Often times when a Klaptrap is seen, it makes a sarcastic comment about its job or what it had just eaten. The show also features an abnormally large Klaptrap named Junior the Giant Klaptrap.
Donkey Kong 64
After several years of absence, Klaptraps finally made a return in Donkey Kong 64, where they are given a new ability. Once a Klaptrap is defeated, its set of teeth will continually attack the Kongs until it breaks (although orange grenades can prevent the teeth from attacking).
Also introduced in the game are Big Klaptraps. These Klaptraps are colored purple (instead of the usual green color) and are slightly larger than the Kongs. They are immune to all of the Kongs' attacks (even the shockwave attack), but can be defeated with an Orange Grenade. Some of Donkey Kong 64's cutscenes show King K. Rool with a small Klaptrap that seems to be his pet.
Also in Donkey Kong 64 a Klaptrap is playable in the minigame Beaver Bother; this marks the first time a Klaptrap is playable.
Super Smash Bros. series
In Super Smash Bros. Melee, Klaptraps (called Klap Trap on its trophy) have appear in the Donkey Kong's stages, Kongo Jungle and Jungle Japes. They swim through water and attempt to bash a character into the abyss. Since the stage returns in Super Smash Bros. Brawl, Klaptraps do return and act as a stage hazard. They are confirmed to reappear in Super Smash Bros. for Nintendo 3DS, as the stage is confirmed to reappear in the aforementioned game.
Klaptraps also make minor appearances in Donkey Konga.
Mario Power Tennis
Klaptraps appear in Mario Power Tennis in Donkey Kong's Jungle Court. They try to bite the player, causing the player to slow down. Klaptraps also appear in the minigame Balloon Panic. Here, the player must protect several balloons from hungry Klaptraps.
Mario Superstar Baseball
Klaptraps are distractions in Donkey Kong's course in Mario Superstar Baseball. Klatraps try to bite the outfielder's heels, slowing them down. However, if the player were to hit the baseball into a Klaptrap's mouth, it will give the player a Team Star.
Mario Party 7
Donkey Kong Country
Donkey Kong Land
Super Smash Bros. Melee Trophy