Hooke's law describes the force a spring exerts when its length is changed.
Of course it makes intuitive sense that when you try to change the length of a spring (by pressing it, for example) the spring exerts a force on your hand, and resists the compression.
For Hooke, this suggested that the force exerted by a spring is always in the opposite direction of the change in length of the spring - When compressed the spring pushes outwards and when pulled apart, the spring tries to compress itself back into that equilibrium length. The equilibrium length is the length of the spring when no force is exerted. Hooke conducted experiments on springs and found that the extension/compression of the spring was proportional to the force the spring exerted.
As an equation: $$ F=-kx $$
,where k was a constant Hooke calculated from the slope of his graph of F vs. x from his experimental data.
From newtons second law $ F=ma=mx'' $, we get $$ F=mx''=-kx $$
hence, $$ x''=-\frac km x $$
However, when one solves this using differential equation, one obtains $$ x(t)=A\sin ({\sqrt{\frac km}}t+\phi) $$
where $ \phi $ and $ A $ are constants determined by the initial conditions.
As you can see, if $ \frac km $ is replaced by $ n^2 $ Newtons law will turn out like it is in your textbook: $$ x''=-n^2x $$
which yields the much nicer looking $$ x(t) = A\sin (nt+\phi) $$
So as such Hookes law was not initially proved theoretically, but rather was based on experimental data
The 'constant' of SHM you cite may refer to $ n=\sqrt {\frac km} $ or to the spring constant $ k $, but the meaning of the term should be clear from the context of its usage.