Besides conditional sentence making it also indicates past time habit.
When Ramesh was young, he would play game once a day.
Past habit as would expressed above.
When Ramesh was young he used to play game once a day.
Used to swim, was used to swimming( be accustomed to), got used to swimming(become accustomed to).
Sima would rather stay home tonight.
Same as prefer except that grammar is different.
Would rather must be followed by a verb, but prefer may or may not be followed by a verb.
Krish would rather drink coca-cola than orange juice.
Krish prefers drinking coca-coal to drinking orange juice /prefers coca-coal to orange juice.
Would rather is followed by than, prefer is followed by to. (While mentioning two things.)
Present: Suren would rather go to class tomorrow than today.
Past: Suren would rather have gone to class yesterday than today.
Would rather that
I would rather that you call me tomorrow(subjunctive meaning)
Furwa would rather that his friend left( for negative: didn’t +verb) for states.( present contrary to fact)(his friend doesn’t leave for states).
Kamal would rather that Sima had( for negative: hadn’t +verb) met him yesterday.(past contrary to fact)(sima did not meet him yesterday)
Suren would rather not go to class tomorrow.
Suren would rather not have gone to class yesterday.
Suren would rather that you not call me me tomorrow.
In invitation, want etc.
Would you like to walk with me?
I wold like to visit japan.