A transition only interpolates between two states, but @keyframes lets you place as many stops as you want and change several properties at once at each stop. You wire it to an element with the animation shorthand (name, duration, easing, delay, iteration count, direction, fill mode).
from/to are just aliases for 0%/100%. Because one stop can change several properties together (transform, background, border-radius…), a single animation can carry a compound move — travel, rotate and recolor all at once.
When to use
If there are only two states, transition is enough. Reach for keyframes when you need three or more steps in sequence, or automatic looping.