BB-8 and the Sphero are likely to share a very similar internal mechanism. The RC robotic ball uses a gyroscope to determine which way is down and two wheels to move the sphere from inside. The base plate (batteries included) serves as a counterweight to keep the wheels acting against the lower half of the sphere. There's also a vertical bearing that helps to keep the wheels in contact with the walls.
The main difference we find with the Sphero is the dynamic mast described by the patent. There is also a control system that keeps everything in balance, making sure the mast is always in vertical position. This, if you think about it, makes the whole mechanism behave like a miniature Segway. The arm can rotate and, according to the patent, magnetically interact with an external element. That means BB-8's head is most likely controlled via magnetic interaction. Magnets at the end of the mast and roller magnets at the base of the head.