We present a mean field theory of composite fermion edge states and their transport properties in the fractional and integer quantum Hall regimes. Slowly varying edge potentials are assumed. It is shown that the effective electro-chemical potentials of composite fermions at the edges of a Hall bar differ, in general, from those of electrons, and an expression for the difference is obtained. Composite fermion edge states of three different types are identified. Two of these types have no analog in previous theories of the integer or fractional quantum Hall effect. The third type includes the usual integer edge states. The direction of propagation of the edge states is consistent with experimental observations. The present theory yields the experimentally observed quantized Hall conductances at the bulk Landau level filling fractions ν = p /( mp ± 1), where m=0, 2, 4, and p = 1, 2, 3, ... It also explains the results of experiments that involve conduction across smooth potential barriers and through adiabatic constrictions, and of experiments that involve selective population and detection of edge channels in the fractional quantum Hall regime. The relationship between the present work and Hartree theories of composite fermion edge structure is discussed.PACS numbers: 73.40.Hm Quantum Hall effect (including fractional)