Where wavefronts arrive in phase, they amplify. Where they arrive out of phase, they cancel. Beamforming is simply engineering the delays so that constructive interference happens exactly where you want to look.
Axial resolution (along the beam) is determined by pulse length — shorter pulses = better. Lateral resolution (side-to-side) is determined by beam width — which is where focusing and element count matter most.
The Fourier transform converts between time-domain echo signals and frequency-domain information. It's used in Doppler processing, noise filtering, and the reconstruction mathematics that turn raw signals into beamformed images.
Beamforming was developed for military SONAR and RADAR during WWII. The mathematics translating these to medical ultrasound in the mid-20th century is one of the clearest examples of dual-use physics in history.