It's defined by how far a beam of light travels in one year – a distance of six trillion miles.
The "light-year" is a unit of length or distance, just like the foot and the centimeter.