In the first book Hermione mentions that she has tried a few spells, before ever arriving at Hogwarts, Sorcerer's Stone, Ch 6:
I've tried a few spells just for practice and it's all worked for me.
Clearly she didn't get into trouble for that. In the second book after Dobby performs a Hover Charm Harry receives a letter from the Ministry of Magic, in Ch 2:
We have received intelligence that a Hover Charm was used at your place of residence this evening at twelve minutes past nine.
As you know, underage wizards are not permitted to perform spells outside school, and further spellwork on your part may lead to expulsion from said school (Decree for the Reasonable Restriction of Underage Socery, 1875, Paragraph C).
We would also ask you to remember that any magical activity that risks notice by members of the non-magical community (Muggles) is a serious offense under section 13 of the International Confederation of Warlocks' Statute of Secrecy.
In the fifth book (Order of the Phoenix) Ch 2 Harry receives a letter after saving Dudley from the Dementors:
We have received intelligence that you performed the Patronus Charm at twenty- three minutes past nine this evening in a Muggle-inhabited area in the presence of a Muggle.
The severity of this breach of the Decree for the Reasonable Restriction of Underage Sorcery has resulted in your expulsion from Hogwarts School of Witchcraft and Wizardry. Ministry representatives will be calling at your place of residence shortly to destroy your wand.
As you have already received an official warning for a previous offense under section 13 of the International Confederation of Wizards' Statute of Secrecy, we regret to inform you that your presence is required at a disciplinary hearing at the Ministry of Magic at 9 A.M. on August 12th.
Students appear to use magic outside of Hogwarts, without getting in trouble, except for Harry Potter. In the movies the violations are even worse, with Hermione repairing Harry's glasses, Harry casting
Lumos Maxima repeatedly in his bedroom.
What is the level of severity (or complexity) of spell which will generate the notice of the Ministry of Magic?