The basic idea is a setup of cameras phisically fixed on a spherical rig that shoot a photo at the same time, and then each of the images stiched with some pre defined parameters as the relative positions of the images does not change.
The central point is displaced so you can sometimes find some misaligment, specially on closer objects. (An explanation on this misaligment here: Do I "need" a panoramic head to shoot 360 panoramas?)
The more cameras you put, the more Mpx you have. This ammount of cameras also defines the focal distance of each shoot. If you want a longer focal lens, you need more shoots.
Take a look at the setup for google street view: https://www.google.com.mx/search?q=google+street+view+camera
There are some other consumer cameras with smaller Mpx output, but the idea is the same, like Bublcam or NokiaOzo. There were several Startups to make this kind of cameras inclusive for video.