We give a geometric description of the loci in the arc space defined by order of contact with a given subscheme, using the resolution of singularities. This induces an identification of the valuations defined by cylinders in the arc space with divisorial valuations. In particular, we recover the description of invariants coming from the resolution of singularities in terms of arcs and jets.