This is an irregular verb. It follows the conjugation pattern of the verb incluir.
Present:
A Ana substitui a manteiga por óleo.
A Ana substitui a manteiga por azeite.
Ana replaces butter with oil.
Preterite:
O Miguel substituiu o sistema antigo no ano passado.
Miguel replaced the old system last year.
Conditional:
A Clara substituiria essa peça facilmente.
Clara would replace that part easily.