Given a coordinate system ##(x',y',z')##, the scale factor ##h_{x'}## of coordinate ##x'## is
$$\lim_{\delta x'\to 0}\frac{D((x'+\delta x',y'z'),(x',y'z'))}{\delta x'}$$
where ##D( (a,b,c),(d,e,f))## is the distance from point ##(a,b,c)## to point ##(d,e,f)##.
In other words, it's the ratio of the size of the displacement to the change in coordinate ##x'## when a tiny increment is added to coordinate ##x'##.
Analogous definitions apply for ##h_{y'}## and ##h_{z'}##.
Note that the scale factor can change with position. For cylindrical coordinates ##h_\phi## increases with the distance from the ##z## axis.