First, let's keep things simple and consider a star with no proper motion, i.e. no motion through the Galaxy relative to Earth.
If you could observe a star continuously throughout the year (as parallax-measuring satellites like Hipparcos or Gaia do), you would find that the path of a nearby star on the sky, relative to background stars, would trace out an ellipse on the sky. For a star at exactly the ecliptic pole (line of sight from Earth is exactly perpendicular to Earth's orbital plane), that ellipse would be a circle. As you move your line of sight away from the ecliptic pole, one axis of the ellipse would shrink by the cosine of the angle you moved (or by the sine of the ecliptic latitude, the angle up from the orbital plane). When you reach a star right on the ecliptic, the ellipse would have flattened out to a straight line, i.e. the one axis would have shrunk to zero. But the length of the long axis is unaffected, so by measuring the length of that long axis of the parallax ellipse, we get the distance to the star, regardless of its position in the sky.
In practice, stars also have proper motion (or at least, any star that is close enough to have a measurable parallax will also have a measurable proper motion), so paths on the sky are those ellipses, combined with a steady linear motion, like this:
So in practice, measuring the parallax involves fitting a function to the positional data that includes both the size of the parallax ellipse and the proper motion. (But with only three free parameters - two dimensions of proper motion, plus the parallax; the shape [but not the size] of the parallax ellipse is set by the known ecliptic latitude.) The parallax angle is half of the angular width of that path perpendicular to the proper motion direction.