to use something new or different instead of something else
substitute something for something
The recipe says you can substitute yoghurt for the sour cream.
to do someone's job until the person who usually does it is able to do it again
Bill substituted for Larry, who was off sick.
to replace someone with another person especially another player:
Michael Owen had to be substituted after 20 minutes on the field.