The streaks and squiggles are the result of camera movement or subject movement during a prolonged exposure. To avoid this, the rule-of-thumb is to use a shutter speed equal or faster than 1 divided into the focal length of the lens. As an example, if the focal length is 200mm, then 1/200 of a second or faster is advised. In other words: Longer focal lengths exaggerate tiny camera movement.
When doing time exposures, you must somehow find a way to support and thus stabilize your camera. Best is a tripod. In a pinch you can find other ways, like setting the camera on something solid or by just pressing it to a lamp post or column or even a wall, during the exposure.
When the exposure is elongated, objects in motion tend to streak. At night, they may reflect insufficient light to be recorded, however, glossy or polished surfaces will reflect (highlights) and these record as streaks. This is also true if the object sports lamps like headlights, taillights or running lights.
Streaks can also be insects or birds flitting about a light source. Also, stars will record as streaks or doodles if the camera is not firmly anchored. Such is the nature of the time exposure.
Also, be advised that sometimes these streaks are caused by the camera’s own vibration induced by shutter or mirror travel and the like.