Wish is most commonly used in hypothetical (or imagined) situations:
I wish that I had a dog. (I don't really have a dog, but if I did, I would be happy.)
I wish (that) you were here. (Unfortunately, you're not, and I miss you.)
Sometimes wish is used in greeting and expressions of goodwill:
We wish you a "Merry Christmas."
They wished him "Happy Birthday."
Wish me luck.
(S V IO DO)
Hope can also be used in expressions of goodwill, but the grammar is slightly different:
I hope (that) you have a Merry Christmas.
I hope (that) you had a nice Birthday.
(some time in the future)
(some time in the past)
Hope can be used to specify a desired outcome. For future hopes, the possibilities remain open, but for past hopes, the outcome has usually been determined already.
I hope you can come to the party on Saturday.
I was hoping that you would come to the party.
I had hoped to see you at the party on Saturday.
I hope to get an A on the exam.
I hope it doesn't rain tomorrow.
He hopes to be elected President.
She hoped you wouldn't find her.
(future possibility)
(but you didn't make it)
(but I didn't)
(it is still possible)
(although it might)
(it could happen)
(but you probably did)
Wish and hope are also used in certain types of requests and pleasantries. In such situations, wish carries a more definite and formal tone.