Johto
Totodile first appeared in The Totodile Duel where both Ash and Misty were trying to capture him. As Totodile jumped into the bushes, they both threw their Lure Balls at him. They then found out that one of the Lure Balls had captured him. They decided to have a battle to decide who could keep him. Ash eventually won the battle and kept Totodile.
Totodile is a highly energetic Pokémon. He is always happy and shows it by dancing, a theme that is focused on when he is released from his Lure Ball, even when being called into a battle. He also acts as a comic relief character, as his tendency to dance is shown in many important matches, frustrating Ash, and confusing his opponents. His Scary Face attack has also been used as a joke a couple of times, one being in a battle with Duplica's Mini-Dit, where Totodile laughed at its imitation of the move before continuing the battle.
Totodile is also fairly romantic, as he was shown to have crushes on an Azumarill and a Quagsire in Love, Totodile Style!.
Totodile was used fairly often during Ash's travels in Johto and also in the Silver Conference. He wasn't used in many gym battles, but he was one of the Pokémon used by Ash during the Whirl Cup.
He has defeated opponents such as a Kingdra, a Charizard, and Harrison's Sneasel. This shows him to be quite capable in battle despite his unevolved state.
Ash left Totodile at Professor Oak's laboratory, along with his other Johto Pokémon, when he departed for the Hoenn region.
Sinnoh
Totodile appeared in DP182 alongside Ash's other Pokémon. He was found dancing in a water fountain and affectionately nibbled on Ash's head before being returned to his Lure Ball. Later, he helped to put out the fire caused by Cyndaquil, together with Corphish and Piplup.