A sandwich costs $3 more than a drink, and together they cost $11. Call the drink d and the sandwich s: you know s=d+3 and s+d=11. Since s and d+3 are the same amount, you may write d+3 wherever s appears. The second equation becomes (d+3)+d=11, which has only one unknown: 2d=8, so d=4, and the sandwich costs $7.
The rule is that equals may replace equals, and two habits keep it safe. Replace every copy of the variable, not just the first one you see. And wrap the replacement in parentheses, because it must act as one unit: if y=x+3, then 2y becomes 2(x+3)=2x+6, not 2x+3.
Evaluation looks the same but is a special case: there you replace a letter with a number, as when 2x at x=3 gives 6, and the result is a value. In substitution the replacement is often another expression, and the result is a new equation or expression that still contains variables. Elimination is the other common method for systems: instead of replacing a variable, you add or subtract whole equations so that one variable cancels. Substitution is quickest when one equation already reads 'y=…' or 'x=…'.
Think of it like this. Substitution resembles sending on a substitute player: the replacement takes the exact position the starter left, and the rules of the game don't change. The algebra version is stricter, since the substitute must be exactly equal to what it replaces, and it goes on as one whole unit, which is why it goes in parentheses.
Core idea. Substitution replaces every occurrence of a variable with an equal value or expression.