1. when we make a wish about the present, we use
If only / I wish + simple past
If only I knew how to use a computer. (I don’t know how to use a computer and I would like to learn how to use it)
I wish I spoke Italian. (I don't speak Italian)
Now listen to Avril Lavigne, enjoy the song and sing along
2. To express a wish about the past (usually regretting something):
If only / I wish + past perfect
If only I had woken up early. (I didn't wake up early and I missed my bus.)
3. When you wish that SOMEONE ELSE would do something (you are usually impatient, or you complain about something you don't like / annoys you):I wish I hadn't eaten so much. (I ate a lot.)
I wish / if only + would + verbExample:
I wish you wouldn't arrive so late all the time (I'm annoyed because you always come late and I want you to arrive on time)
I wish it would stop raining. (I'm impatient because it is raining and I want to go outside.)
Finally, to practise a little, go here. to better-english.com, myenglishpages.com... In busyteacher you'll find some sentences and their answers below (please, don't look at them until you've done them first).
Tolearnenglish has exercises for present wishes, regrets, and past situations, and more...