Hermione did magic and was not put into Azkaban, because she was not responsible for herself and probably people her age who aren't registered to schools or magical parents aren't considered accountable until taught. And she was technically in the presence of older wizards that could handle a situation if she caused to much of a disruption(if she did it on the train). People can obviously detect who does underage magic, but they can also detect its threat level. She was also not a threat. They probably also decide who they want to arrest or whatever it is they do with them. Also, if she did it at home or at Diagon Alley they either:
Decided she wasn't a threat and didn't particularly care. I mean what could she do, really?
Were to busy people catching someone else for something like stealing or attacking someone
They were swamped by other 11 year olds (or younger; or older) trying out magic that was either dangerous or more disruptive. Because odds are Ron and Hermione weren't the only people trying out spells with their new wands before school.
The ministry has a record for ignoring "minor" crimes to catch the larger ones.
The Prisoner of Azkaban, Chapter 3 The Knight Bus, pg. 42
"Last year, I got an official warning just because a house-elf
smashed a pudding in my uncle's house!" he told Fudge, frowning. "The
Mininstry of Magic said I'd be expelled from Hogwarts if there was any
more magic there!"
Unless Harry's eyes were decieving him, Fudge was suddenly looking
"Circumstances change, Harry.... We have to take into count... in the
present climate... Surely you don't want to be expelled?"
This is a separate quote on the same page.
"......Why had Fudge been waiting for him at the Leaky Cauldron, if
not to punish him for what he'd done? And now Harry came to think of
it, surely it wasn't usual for the Minister of Magic himself to get
involved in matters of underage magic?
My 2 Theories
She practiced magic at Diagon Alley, this is a theory that I don't put much stock in as she wouldn't have known any spells and when did she read the books. Possibly on the drive home. But I don't think so.
Hermione practiced spells when she was at her home. She probably picked up her spell book and read a couple of simple ones, then she performed them. She probably read her History of Magic book afterward and stopped. She probably read something inside of it telling her about underage magic and performing magic around muggles (cousins, neighbors, etc). This theory always says that the Ministry probably saw that the magic was coming from a unregistered house and had someone check on it or do nothing. Or she never read anything about it and carried along on her merry way.
The theory that you are only responsible if you are registered and in school or have a magical parent watching you is supported by the fact that Harry, Lily and Hermione weren't sent to jail for opening and closing flowers, doing simple spells, or growing their hair out and all the other subconscious magic Harry did. Nothing legal happened to her.
Also, you can't send someone to jail for not knowing. People like Hermione didn't know, the magical community would be in uproar if they sent little girls to jail for stuff like that.
Deathly Hallows Chapter 33, The Princes Tale Pg. 667
"...and the Ministry can punish you if you do magic outside school,
you get letters."
"But I have done magic outside school!"
"We're all right. We haven't got wands yet. They let you off when
your're a kid and you can't help it. But once your're eleven," he
nodded importantly,"and they start training you, then you've got to go
So once she got into school that's when it actually mattered. Also, Hermione read all her books, but those were a lot of books. You don't know which portion had the underage magic in it and when she got around to reading it. Possibly the day before class.
Also, when Hermione saw Ron doing spells if she had of known anything was up she would have said something, but she seemed unaware. She ordered him to show her.
Not that you particularly care about this source.
The officials probably didn't think a underage wizard could anything with a wand, so they probably didn't tell her not to use it. She was a muggle-born, they probably discounted her.