Stereo imaging relies on three cues: interaural level differences (ILD — a sound louder in the left ear is perceived as coming from the left), interaural time differences (ITD — a sound arriving at the left ear first is perceived as left), and spectral cues (HRTF — frequency shaping by the head and ears provides elevation and front/back information).
Panning in a DAW primarily uses level differences (pan law). Stereo microphone techniques (XY, ORTF, spaced pair) use combinations of level and time differences to create natural stereo images. Stereo widening plugins manipulate phase to push sounds beyond the speaker boundaries — but can cause mono compatibility problems.