To be able to make such an image you will have to learn an art known as light painting. The technique used to make such an image is through exposing a photograph to a moving light source. In addition, you can also use a program like Photoshop to make such an image.
That kind of art doesn't just happen. You have to have a gift. And the colors were probably modified by computers. So to answer your question, hard work, talent, and practice. That kind of art doesn't happen overnight.