In the Harry Potter series of books, the Imperius Curse is a powerful magical curse that controls people's minds and actions. Because of its great power and immoral nature, it is considered to be one of the three unforgivable curses, meaning its use is enough to earn the caster life in prison.
The effects of being under the curse are described as being in a warm haze, where all questions and worries about following the caster's will seem distant and unimportant. The exact mechanics of the curse are (as with many other spells) not exactly described, although it does involve the wand movement and the spoken charm of "Imperio!". Since some people are described as being skilled at the curse, there might be some interior mechanics or mental focus involved in using the curse that is not totally describable. There are two other limitations on using the curse: first, the person using this curse must have turned at least somewhat towards evil to do so. Even in an emergency, characters who are not particularly motivated by controlling others find it hard to use the curse. The second, as described, is the legal repercussions of having got caught using the curse.
To me, there are two contrasting facts about the construction of the Harry Potter series. First, there is the overarching subtlety and realism that J.K. Rowling used in constructing the series. Second, there is the random use of McGuffins and unobtanium she uses to move the action forward. The Imperius Curse, I feel, is sometimes used in the second way. When there is a mystery about motivations or what has happened, the reader expects some type of conclusion that builds on what they have read so far. At several points, the big revelation about what is happening is that someone was "acting under the Imperius Curse". Its a bit of a diablo ex machina, in a way, to find out that someone does not have deeply buried evil motivations, but just happened to not be paying attention when a curse hit them.
Of course, some people reading this were already aware that the Harry Potter books did not at all times have the most perfect literary construction, and so they will be less disappointed than I am in such things as the misuse of things like the Imperius Curse.