Weave in and out (of something)

To move or drive or walk in and out of something such as traffic.

The man was driving very fast and was weaving in and out of the traffic.