praveen, first, and to agree with Barb-D, a ball is thrown at someone's head, not on someone's head.
Ex: Max threw the ball at Sam's head.
Second, an indirect object is usually the 'receiver' of an action described by a verb:
Ex: Max threw me the ball. <indirect object>
Verbs like throw are called ditransitive verbs. They take two objects: a direct object (DO) and an indirect object (IO). The objects of most ditransitive verbs can be repositioned, or undergo what appears to be a positional switch. The IO becomes an adverbial phrase:
Ex: Max threw the ball to me. <adverbial phrase>
To me functions as an adverbial phrase; it tells us where Max threw the ball. The same holds true here:
Ex: Max threw the ball at Sam's head. <adverbial phrase>
Note, however, if we turn the adverbial phrase at Sam's head into an IO, the meaning changes:
Lastly, there's a lot to be said about the function and distribution of the adverbs badly and poorly--which I am most certain our members will bring up--but as for adverb placement in general, these are your options:
Ex: Max threw Sam's head
the ball. <indirect object>
Sam's head is either decapitated or it has the ability to catch a ball.
Ex: Happily, Max threw the ball at Sam's head.
Ex: Max happily threw the ball at Sam's head.
Ex: Max threw the ball happily at Sam's head.
Ex: Max threw the ball at Sam's head, happily.
Does that help?