Crookshanks is the cat bought by Hermoine Granger at the beginning of the book Prisoner of Azkaban.
Crookshanks was falsely accused by Ron Weasley of killing and eating his pet rat Scabbers, who himself has a dubious reputation. Scabbers the rat was found to be the secret Animagus form of Peter Pettigrew a follower of Lord Voldermort who revealed the secret of where Harry's parents were hidden. Crookshanks was cleared when Hagrid gave Scabbers back to Ron in his hut just before the Minister of Magic, Cornealius Fudge and an executioner arrived to behead the hippogriff Buckbeak.
Crookshanks also consorted with a mangy looking dog who turned out the be the Animagus Sirius Black, Harry's god-father who had been falsely accused of murdering Peter Pettigrew and numerous muggles. For this crime Sirius had been sentenced to the Wizard's Prison at Azkaban.
In the books following Prisoner of Azkaban, Crookshanks has a minor role and is only seen in minor references.