Let X be a smooth irreducible projective curve of genus g and gonality 4. We show that the canonical model of X is contained in a uniquely defined surface, ruled by conics, whose geometry is deeply related to that of X. This surface allows us to define four invariants of X and, hence, to stratify the moduli space of four-gonal curves by means of closed irreducible subvarieties, whose dimensions we compute.