I wish I had bought a new car.The speaker wishes he had a car different from the one he has: a new car.
I wish I could buy a new car.The speaker wishes he had the money so he could buy a new car.
Re:I wish he didn't come to my house so often.The speaker is talking about someone who he would like to see less often. Especially, he would like to see him less often at his (the speaker's) house.
Say:I wish I had gone to London.The speaker regrets not having gone to London.
Say:I hope it will be hot this weekend.The speaker is hoping the weather will be very warm on the coming weekend.
Say:I wish it could be hot this weekend.The speaker regrets that the weather won't be hot during the coming weekend.
Student or Learner