English does this too. If I were you, not "if I was you": changing was to were is a past mood tense. Spanish uses its own mood tense whenever si introduces a hypothetical past.
Si pudiera cocinar, cocinaría.
Si pudiera cancelarlo, lo cancelaría · Si vieras su casa · Si lo viera, lo comprendería
The second half takes would, so remember the hook: me gustaría gives you the -ía.
Start a sentence with que and a mood-tense verb and you get the sense of the fact that, or that you may have. English does something similar with may have.
Que lo compraras no es mi problema · Que le contaras no es mi problema
Some verbs change their stem in the point past, and since the past mood tense is built from the they form, the change carries over.
Si me lo hubieras contado, habría ido · Si hubiéramos sabido, habríamos ido
The pairing that makes these conditional sentences work: the si half in the past mood tense, the other half in would have.
Si me lo hubieras contado, habría ido.
Remember the e falls out: habría, not "habería".
You may hear or read a second form, ending -ase or -iese.
How much it is used depends on the dialect, and there is no difference in meaning: they are two versions of the same tense. You need not use it, but recognise it.
Mi casa · Tu casa · Su casa
Su casa still covers his, her, their and formal your house.
Si vieras su casa · Si lo viera, lo entendería
Both comprender and entender work for to understand.