Zippity the Hamster is a character/pet.
After Barney and the kids had fun in school, they forgot about Zippity when Derek realized that he was gone, because earlier Derek left the lid open by accident. The gang searched the whole classroom looking for Zippity until they found him under a hat. Derek returned Zippity back to his shelter and this time he closed the lid.
Though Zippity has been seen in the background a lot of times on Barney, these are some appearances where he is on-screen.