Since the subject of traffic dynamics has captured the interest of physicists, many astonishing effects have been revealed and explained. Some of the questions now understood are the following: Why are vehicles sometimes stopped by so-called ``phantom traffic jams'', although they all like to drive fast? What are the mechanisms behind stop-and-go traffic? Why are there several different kinds of congestion, and how are they related? Why do most traffic jams occur considerably before the road capacity is reached? Can a temporary reduction of the traffic volume cause a lasting traffic jam? Under which conditions can speed limits speed up traffic? Why do pedestrians moving in opposite directions normally organize in lanes, while similar systems are ``freezing by heating''? Why do self-organizing systems tend to reach an optimal state? Why do panicking pedestrians produce dangerous deadlocks? All these questions have been answered by applying and extending methods from statistical physics and non-linear dynamics to self-driven many-particle systems. This review article on traffic introduces (i) empirically data, facts, and observations, (ii) the main approaches to pedestrian, highway, and city traffic, (iii) microscopic (particle-based), mesoscopic (gas-kinetic), and macroscopic (fluid-dynamic) models. Attention is also paid to the formulation of a micro-macro link, to aspects of universality, and to other unifying concepts like a general modelling framework for self-driven many-particle systems, including spin systems. Subjects such as the optimization of traffic flows and relations to biological or socio-economic systems such as bacterial colonies, flocks of birds, panics, and stock market dynamics are discussed as well.