In order to measure distance in your own frame you get a ruler.
However, you can't measure moving things the same way. If
you try to measure a train by running along side it with a ruler, then
you're no longer in your own frame.
To measure a moving object you get a stopwatch and time how long it takes for the object to pass.
One of the weird effects of relativity is that fast objects shrink in the direction of their movement.
Here's why:
In the train analogy it can be seen that time is "skewed", seen from
inside the train events at the front are seen as happening earlier (as
compared to how a someone watching the train pass would claim), and
events at the back are later.
Cross your eyes and try to picture the situation from the point of view
of someone outside the train, watching it pass. They will see the
front of the train arrive late (on time onboard, since they see things
sooner), and the back of the train arrive early (right on time in the
train again).
But, if the front of the train is early and the back is late, then the train will literally shrink. Seriously.
Technically...
As always, phrase the question in the form of two events.
Since the yardstick is moving in order to measure it you can stay put
and time how long it takes for the stick to pass. So event one is
the front of the stick passing you, and event two is the back of the
stick passing.

In your frame the two events happen in the same place, so X = 0. The length of the stick is L = VT.
So:


This here is the reference frame of the stick. It sees you and
your stopwatch move from the front to the back at speed V. Given
that the yardstick is L' in length at rest:

The interval between the events must stay the same.

So the length as measured from a moving observer is shorter, by a factor of
.