There are a variety of ways to take the photographs to use to make a composite, panorama photograph, and a variety of software options to stitch the frames together and deal with any problems; plus there are a number of ratios you can crop the result to, or you can just crop off any excess (and now of course, if this is acceptable to you, Adobe can instead fill in any blank edges with content that can frequently look real (I don’t do this myself)).
I have an adapter for my camera which means that all of my lenses can operate as shift (and tilt) lenses, which means I can capture 3 frames that are free of any aberrations and don’t needs any special treatment beyond finding the overlaps and glueing them together, which to my mind goes further to protecting the quality of the pixels I have to work with. It helps when I remember to set the speed to a fixed (manual) value (ISO and color balance can be set later in the computer if not done originally, and as all my lenses are manual, aperture is always set).
Typically I turn my camera on its side and do three shifts, which I can then use as either a regular rectangular (8.5×6.5) image or a moderate panorama (16×9). Occasionally I will leave the camera horizontal for the shift, which can produce a wider, cinematic image (2.35×1) such as the above photograph of Cromarty Firth from Rosemarkie Beach (no, I didn’t see any dolphins this time).
Depending on your point of view, this might all sound very clever stuff, or an incredible amount of messing around. This can be especially true when you look at what the typical smartphone can accomplish today; you just choice the pano option, press the button and sweep, and when you finish, you are presented with a very nice pano, such as this almost 180 degree view of our back garden, and over into the field next door, from the deck.
Having said all that, most of my (16×9) panoramas are simply crops from a single exposure, such as this one from the Isle of Harris.