How a panorama image is done - I'm not talking about some in camera or in phone apps. Those apps work on a different level, are less precise and less detailed and often cause some surprising effects like a stretched dog which was running through the shot.
A panorama image is basically a series of photos, taken in varying angles usually on a horizontal line. However, there are vertical panoramas too, for example to show the Milky-Way.
The easiest form is just one row of images, though my biggest panoramas consist from up to 5 rows, up to more than 100 single shots. It really depends on the lens you use and the final angle you want to achieve. More rows also increase the level of detail dramatically, as well as the final resolution of the image.
Ideally you will use a tripod with a panning head, so the start point of each photo and the vertical angle stays constant. More practiced photographers can do it handheld.
All camera settings should be manual and should be fixed, including focus. So you decide where your main subject will be and focus on this before you start shooting. Auto mode would change the light in each shot, gets you a bunch of brighter and darker images, resulting in an inconsistent overall lighting.
The single shots need to overlap each others by at least 30%, I prefer to overlap to about 60%. The larger overlap helps if one of the shots isn't right, out of focus etc, and it can just be ignored.
Personally I prefer a 24 mm (wide angle) lens for such images (on a full frame camera). Most kit lenses will be zoom lenses with a similar wide angle length depending on your camera.
Those photos will be loaded into a panoramic software which "stitches" them together (EG Photoshop). The software removes most distortions and adjusts the edges, lighting etc. In photo-film times this had to be done in the darkroom, by aligning the lenses of the projectors etc. However, everything you can do in Photoshop has its origin in a darkroom.
Once stitched, you will have to fine-tune the image, removing steps in the horizon (a very common issue), removing a bird half in one and not at all showing in the next frame, etc, as well as adjusting lighting, white balance and so forth - This has also been done in the darkroom, by using filters, different sorts of paper etc.
Here an example of a low light single row panorama, this one is of course available as a print:
And here an example of how it looked if "stitched manually", without a panorama software correcting distortions etc. In this version I simply overlaid the original photos, without changing the initial shots. You also see some doubled edges in buildings in this version, another result of distortion:
Here the single images used in the stitching process. You will notice, image #7 is out of focus, but because I overlap my single shots for panoramas by more than the recommended 30%, I could just leave this one out without losing any detail.