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 anthropomorphic 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.
Donkey Kong series
Donkey Kong Country
Purple Klaptraps also appear in a bonus level on the stage Trick Track Trek, and appear rather frequently on the stage Loopy Lights. 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 later appear in Donkey Kong Country's semi-sequel Donkey Kong Land. Klaptraps are relatively unchanged in this appearance.
Klaptraps can be completely avoided by riding Expresso the Ostrich over them, thanks to Expresso's tall legs.
Klaptraps never appeared in Donkey Kong Country 2: Diddy's Kong Quest, nor in Donkey Kong Country 3: Dixie Kong's Double Trouble!. However, their relatives, Klampon (DKC2) and Krimp (DKC3), made appearances in those games.
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 Giant 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.
Klaptraps also make minor appearances in Donkey Konga.
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.
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.
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.
Appearances in the Donkey Kong Country Animated Series
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 Country
Donkey Kong Land
Super Smash Bros. Melee Trophy