It is an effect created by long exposure of moving stars. Sometimes it may be desired or undesired in a photograph.
Prevention
If you would like to prevent star trails, use appropriate exposure calculation method such as NPF Rule or 500 Rule. Also, make sure that your ISO is high enough to allow you to use a correct shutter speed.