What does it mean when scientists say that a planet or star is a certain amount of light years away?
It is the time light takes to run the distance between that star and us, measured in years.
We should remember it is a unit of length. It is equivalent to say we take 30 minutes between school and home by bus.
Astronomers use light-years, and not kilometers or miles because the distances are very big, and the numbers in these units would be in the scale of billions.
As for example, Alpha Centaury is 4.4 light years from us. It is a number we can deal. But if we wanted to express this in km we would have:
which is about