This type of photography is called light trailing. This is done by playing with shutter speed, ISO and aperture