"This cat isn't mad. He's the most intelligent of
his kind I've ever met."
-- Sirius Black
Crookshanks is a most fascinating creature. He appears to be a large ginger cat with a squashed flat face and bottle-brush tail. He belongs to Hermione, who purchased him at the Magical Menagerie in Diagon Alley (August 1993), where he'd been for quite a long time as no one wanted to buy him (PA4). Crookshanks is part Kneazle (Nr), which accounts for his unusual intelligence and his ability to identify suspicious characters, most notably Pettigrew when disguised as Scabbers (PA). But he also recognizes and disapproves of cheating, judging by the way he stared at Harry and Ron when they were making up answers on their Divination homework (GF14).
Crookshanks is a bit odd -- he sometimes catches and slowly eats spiders, for example (PA8) -- but then most cats are, as any cat-lover will tell you. He loves to chase gnomes in the Weasley garden (GF5) and, if given a chance, will gleefully chase all the pieces off a chessboard (OP38). Because of the cat's attitude toward his pet rat, Ron disliked Crookshanks intensely when Hermione bought him. However, once the cat's true nature and intentions became clear (and when Scabbers' did as well), Ron accepted Crookshanks and even held up Pigwidgeon, his new owl, up to the cat for approval.
Rowling on Crookshanks:
When I was working in London in the late 1980s I used to eat my lunch in a nearby square on sunny days and a large, fluffy ginger cat that looked as though it had run face-first into a wall used to prowl around the sunbathers there; I assume it lived in a nearby house. I didn't ever get close enough to give myself an asthma attack, but I became distantly fond of this cat, which prowled among the humans around it looking disdainful and refusing to be stroked. When I decided to give Hermione an unusually intelligent cat I gave him the appearance of this haughty animal, with the slightly unfair addition of bandy legs (JKR).