Wishes and regrets
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á'.
Wishes about the present (and the future)
If you want to talk about your present situation, you can use the structure wish + past simple or continuous. For example:
I haven't got any money. I wish I had some money.
I don't earn much money. I wish I earned a lot of money.
We're all living in a small flat. I wish we weren't living in a small flat. I wish we were living in a big flat.
The same form can be used to talk about someone else's situation. However, there is another structure that you use to talk about actions that take place in the present, but you want them to change in the future. This structure is used to talk about another person, and generally about things you don't like. The structure is wish + would/could + infinitive. For example:
Your friend is always borrowing money from you because he never seems to have his bank card with him. You could say to him:
I wish you wouldn't keep borrowing money from me.
I wish you would remember to go to the bank from time to time.
Perhaps the same friend does lots of things that irritate you. Maybe he phones you early in the morning when you're still in bed. He might arrange to meet you and then turn up late. You could say to him:
I wish you wouldn't phone me so early in the morning.
I wish you would wait until later.
I wish you would tell me when you're going to be late.
Wishes about the future (and the present)
When you talk about the future, you use the same structure as you use to talk about present states. Some examples:
I have to go to the dentist tomorrow. I wish I didn't have to go to the dentist tomorrow.
I'll have to do some extra work over the weekend. I wish I didn't have to do any extra work over the weekend.
My brother is coming to stay with me next week. I wish my brother wasn't coming next week.
The future in these cases can't be changed (in theory), and so the situation is seen as unreal and has to be referred to using past tenses.
Wishes about the past: regrets
When you think about a situation in the past, naturally you can't do anything to change it. Therefore this is a way of expressing regret. The structure you use is wish + past perfect. For example:
You were too slow getting ready to go out. I wish you hadn't been so slow getting ready.
Now we've missed the train. I wish we hadn't missed the train.
I promised our friends we'd arrive on time. I wish I hadn't promised we'd arrive on time, because now they'll be waiting for us.
As mentioned above, the structure wish + would can't be used to talk about yourself. It is used to refer to actions, and you should be able to stop any action you're doing.
Therefore when you talk about yourself, you're talking about states you have no control over (I'm poor, I wish I was rich) or other people's actions that you have no control over either (I haven't got any money. I wish you'd give me some).
If your wish might come true, you should use a different type of verb. For example:
I hope it doesn't rain tomorrow.
I'd like to go to the Caribbean for my holiday next year.
I hope you get well soon.
You don't need to repeat all the verbs all the time:
My flat is cold. I wish it wasn't.
You smoke. I wish you wouldn't.
She told him! I wish she hadn't.