A block on a horizontal spring has two different types of energy:
its kinetic energy, $\frac12mv^2$, due to its motion.
its spring potential energy, $\frac12ky^2$ due to the stretching of the spring ($y$ is its displacement, which is how much the spring is stretched or compressed)
When the block is at the equilibrium point, the spring energy is zero, but the block is moving as fast as it can so its kinetic energy is maximal. When the block is at its turning points, on the other hand, the spring constant is maximal but the kinetic energy is zero. As the block moves, the energy moves back and forth between kinetic and potential energy.
If the block experiences no friction, then the total energy $$E_{tot}=\frac12mv^2 + \frac12ky^2$$ remains the same. We could calculate this total energy at any point of the oscillation. For instance, at the turning points the total energy is
$$E_{tot} = \frac12kA^2$$
where $A$ is the amplitude of the oscillation. At the equilibrium points, on the other hand, the total energy is $$E_{tot}=\frac12mv_{\max}^2$$
Aside
According to conservation of energy, these two totals better be the same. We can use this to derive the frequency of the block on the spring if we like! We need the fact from Velocity and Acceleration that the maximum velocity is $v_{\max}=2\pi Af$: $$\begin{align} \frac12kA^2 &= \frac12mv_{\max}^2\\ kA^2 &= m(2\pi Af)^2\\ f^2 &= {kA^2\over 4\pi^2mA^2}\\ f &= \sqrt{k\over 4\pi^2m^2} = \frac1{2\pi}\sqrt{k\over m}\\ \end{align}$$ which is just as we said in Block on a Spring.