4. From the vertex of the parabola $y=x^{2}$, draw two perpendicular chords $O A$ and $O B$, and construct $O M \perp A B$. Then the equation of the locus of point $M$ is
4. $x^{2}+y^{2}-y=0$.

Given that $A$ and $B$ are on the parabola and $O A \perp O B$, we can set the coordinates of $A$ and $B$ as $\left(m, m^{2}\right),\left(-\frac{1}{m}, \frac{1}{m^{2}}\right)(m \neq 0)$. Then the equation of $A B$ is
$$
\frac{y-m^{2}}{x-m}=\frac{m^{2}-\frac{1}{m^{2}}}{m+\frac{1}{m}}=\frac{m^{2}-1}{m} .
$$

Similarly, $\frac{y-1}{x}=\frac{m^{2}-1}{m}$.
It is evident that the line $A B$ passes through the fixed point $D(0,1)$. Since $O M \perp A B$, $M$ lies on the circle with $O D$ as its diameter (as shown in Figure 7), and the equation of the trajectory is
$$
x^{2}+\left(y-\frac{1}{2}\right)^{2}=\left(\frac{1}{2}\right)^{2}
$$

or $x^{2}+y^{2}-y=0$.