First, you take a lot of photos without moving the camera/drone/arm.
Then stitch them with a pano program, there's two main programs that can be helpful, Microsoft ICE (Image Composite Editor), which is free and very easy to use, provided you make sure you take the same number of shots per row and line them all up ok. Or my fave, and the program that produced this, Hugin. Then you tweak/adjust/etc until you get something you like.
There's a heap of great Youtube videos on how to do it so I wont bore you with the details. Look for "tiny planet panorama". I believe if you're really good with Photoshop you can do it in there too, or as I found out tonight, there's even cameras that do it for you in one click (Ricoh Theta 360).