You can use this structure when you would like things to be different from the way they actually are.
Use the verb wish to refer to how you would like things to be in the present or to talk about how you would like things to be in the future.
It can also be used to talk about the way things were in the past, but obviously the past can't be changed.
The general concept is sometimes known as 'wishful thinking' and often coincides with the use in Spanish of 'ojalá'. But if you want to say 'ojalá' and nothing else, say 'if only'.
Wishes about the present and future
1. We use 'wish' + past simple to express that we want a situation in the present (or future) to be different.
I wish I spoke Italian. -- I don't speak Italian I wish I had a big car. -- I don't have a big car I wish I was on a beach. -- I'm in the office Future: I wish it was the weekend tomorrow. -- It's only Thursday tomorrow