Originally, a metre was defined as 1/10,000,000th of the circumference of the Earth, and then later as the distance between two lines on a platinum-iridium bar, which provided the standard measure of a metre. However, today the metre is defined as the distance light travels in 1/299792458 seconds. This means that distance is calculated based on time- a unit of distance is measured in terms of how much distance light travels in a period of time. A light-year is another distance measured by time,and it is the distance light travels in one year.
Reference: HSC Students guide to physics