The magic is sensor size and that it is an effective focal length. It is far easier to make a long effective focal length for a very small sensor than it is to make the same for a larger sensor. This is also (part of) why APS-c lenses (EF-s) are so much cheaper than EF lenses that are designed for full frame and why APS-c sensors get more effective range out of a shorter lens.
Effective focal lengths are generally given in proportion to a 35mm sensor (full frame) equivalent. Since a small sensor captures only a small portion of that area, the effect is that only a small portion of the center is captured. This factor (called crop factor) results in a multiplicative effect on whatever the actual focal length is.
The actual focal length (marked on the lens) is 4mm to 215mm which gives it a crop factor of roughly 5.6. (5.6 times 215 is about 1200mm effective) The lens is also still smaller than most other 215mm lenses, but that is due to not having to collect as much light since it doesn't have to fill an entire 35mm sensor, only the amount of light needed to fill the tiny point and shoot sensor.