To use in place of something else, with the same function.
- I had no shallots so I substituted onion.
In the phrase "substitute X for Y", to use X in place of Y.
- I had to substitute new parts for the old ones.
In the phrase "substitute X with/by Y", to use Y in place of X.
- I had to substitute old parts with the new ones.
To remove (a player) from the field of play and bring on another in his place.
- He was playing poorly and was substituted after twenty minutes.
To serve as a replacement (for someone or something).
- Accumulation of wealth by this route may substitute for personal saving.