We investigate local and metric geometry of weighted Carnot-Carathéodory spaces which are a wide generalization of sub-Riemannian manifolds and arise in nonlinear control theory, subelliptic equations etc. For such spaces the intrinsic Carnot-Carathéodory metric might not exist, and some other new effects take place. We describe the local algebraic structure of such a space, endowed with a certain quasimetric (first introduced by A. Nagel, E.M. Stein and S. Wainger), and compare local geometries of the initial C-C space and its tangent cone at some fixed (possibly nonregular) point. The main results of the present paper are new even for the case of sub-Riemannian manifolds. Moreover, they yield new proofs of such classical results as the Local approximation theorem and the Tangent cone theorem, proved for Hörmander vector fields by M. Gromov, A.Bellaiche, J.Mitchell etc.