We present a detailed analysis of the two-point correlation function, ξ (σ, π) from the 2dF Galaxy Redshift purvey (2dFGRS). The large size of the catalogue, which contains ∼220 000 redshifts, allows us to make high-precision measurements of various properties of the galaxy clustering pattern. The effective redshift at which our estimates are made is z s ≈ 0.15, and similarly the effective luminosity, L s ≈ 1.4L*. We estimate the redshift-space correlation function, ξ(s), from which we measure the redshift-space clustering length, S 0 = 6. 82 ± 0.28 h -1 Mpc. We also estimate the projected correlation function, Ξ (σ), and the real-space correlation function, ξ(r), which can be fit by a power law (r/r 0) -γr, with r 0 = 5.05 ± 0.26 h -1 Mpc, γ r = 1.67 ± 0.03. For r ≳ 20 h -1 Mpc, ξ drops below a power law as, for instance, is expected in the popular A cold dark matter model. The ratio of amplitudes of the real- and redshift-space correlation functions on scales of 8-30 h -1 Mpc gives an estimate of the redshift-space distortion parameter β. The quadrupole moment of ξ(σ, π) on scales 30-40 h -1 Mpc provides another estimate of β. We also estimate the distribution function of pairwise peculiar velocities, f(v), including rigorously the significant effect due to the infall velocities, and we find that the distribution is well fit by an exponential form. The accuracy of our ξ(σ, π) measurement is sufficient to constrain a model, which simultaneously fits the shape and amplitude of ξ(r) and the two redshift-space distortion effects parametrized by β and velocity dispersion, a. We find β= 0.49 ± 0.09 and a = 506 ± 52 km s -1, although the best-fitting values are strongly correlated. We measure the variation of the peculiar velocity dispersion with projected separation, a(σ), and find that the shape is consistent with models and simulations. This is the first time that β and f(v) have been estimated from a self-consistent model of galaxy velocities. Using the constraints on bias from recent estimates, and taking account of redshift evolution, we conclude that β (L = L*,z = 0) = 0.47 ± 0.08, and that the present-day matter density of the Universe, Ω m ≈ 0.3, consistent with other 2dFGRS estimates and independent analyses.