Note to Hamlet, 4.7.15-16: "as the star moves not but in his sphere, / I could not but by her"
Here is my paraphrase of what the king says about his queen: "as a star moves only by virtue of the movement of the sphere in which it is fixed, so I could not do anything without her."
In saying this, the king compares his love for his wife to what was, at that time, thought to be a fact of nature. The Ptolemaic astronomy of Shakespeare's time taught that all stars were fixed in crystalline spheres; the spheres moved around the earth, and the stars moved only as their spheres moved.
Below is a diagram of the celestial spheres, made in 1539, twenty-five years before Shakespeare's birth. For more information, see the Wikipedia page, Celestial spheres.