We analyze the characteristic features of jam formation on a circular one-lane road. We have applied an optimal velocity model including stochastic noise, where cars are treated as moving and interacting particles. The motion of N cars is described by the system of 2N stochastic differential equations with multiplicative white noise. Our system of cars behaves in qualitatively different ways depending on the values of control parameters c (dimensionless density), b (sensitivity parameter characterising the fastness of relaxation), and a (dimensionless noise intensity). In analogy to the gas-liquid phase transition in supersaturated vapour at low enough temperatures, we observe three different regimes of traffic flow at small enough values of b < b cr . There is the free flow regime (like gaseous phase) at small densities of cars, the coexistence of a jam and free flow (like liquid and gas) at intermediate densities, and homogeneous dense traffic (like liquid phase) at large densities. The transition from free flow to congested traffic occurs when the homogeneous solution becomes unstable and evolves into the limit cycle. The opposite process takes place at a different density, so that we have a hysteresis effect and phase transition of the first order. A phase transition of second order, characterised by critical exponents, takes place at a certain critical density c = c cr . Inclusion of the stochastic noise allows us to calculate the distribution of headway distances and time headways between the successive cars, as well as the distribution of jam (car cluster) sizes in a congested traffic.