Non-singularity of an algebraic variety can be characterised in intrinsic terms by the fact that all local rings are regular local rings.

By a theorem of Serre, any localization of a regular local ring at a prime ideal is again a regular local ring.

If ones proves that the local ring at any non-closed point is a localization of a local ring at a closed point, by the previous theorem it suffices to check non-singularity at closed points.

I am confused as to how to prove the former statement.