Use бы + -л- in both clauses of unreal conditional sentences.
Unreal conditional sentences are either hypothetical (If he were to come...) or contrary to fact (If he had come... [but he didn't, as a matter of fact]).
English distinguishes these two types, but Russian doesn't. The rule for word order is: the unstressed particle бы can't come first in its clause. The verb is always in the л-form (the same as the past tense).
Russian sentences with бы are sometimes ambiguous from an English point of view, but context resolves the ambiguity. Compare real and unreal conditions:
Real: Љсли ћн придёт, мІ пољдем зђ город. If he comes, we'll go to the country.
Unreal: Љсли бы ћн пришёл, мІ бы пољхали зђ город. If he were to come, we'd go to the country.
    If he had come, we'd have gone...
  Љсли бы Сђша не пришёл, бІло бы скџчно. If Sasha weren't here, it would be boring.
  БІло бы плћхо, љсли бы Сђша не пришёл. It would have been bad if Sasha hadn't come.
  Љсли бы ћн пришёл, мІ бы пољхали зђ город. If he had come, we would have gone to the country.
If he were to come, we would go to the country.
  Љсли бы былђ вђнная, ї бы снялђ. If there were a bath, I'd take it [this apartment].
Had there been a bath, I'd have taken it.
Don't equate бы with English 'would', which is sometimes used for 'will' (not conditional); Russian has a future form, not бы, in such sentences:
Ћн сказђл, что придёт. He said he would (will) come.