Hopefully is an adverb which means what it ought to--"full of hope" or "characterized by hope." It normally modifies verbs.
Nonstandard English sometimes substitutes the word hopefully for I hope (or some other subject with the verb hope).
Correct: They listened hopefully for the sound of the rescue party.
(They listened with hope)Incorrect: Hopefully, they will come in time.
Correct: I hope they will come in time.