The physics
A source that moves toward you bunches its waves up in front. Shorter waves reach you more often, so you hear a higher pitch. Behind it, the waves spread out and the pitch falls.
A listener who moves toward a still source meets its waves faster. The waves keep their length, but the pitch still rises.
f′ = f (v + w ± vo)/(v + w ∓ vs)
Take the top sign when that one moves toward the other. The wind w counts from the source to the listener. With both still, the wind changes nothing.
Light shifts in the same way. A longer wavelength means the star moves away.
v = c Δλ/λ
A jet faster than sound outruns its waves. They pile up on a cone, the shock wave. You hear the boom when the cone's edge reaches you.
sin θ = v/u = 1/M d = h/tan θ