A prefix is a power of ten
A metric prefix scales a unit by a fixed power of ten: kilo- means × 1000, so a kilometer is 1000 meters, and milli- means × 0.001, so a milliliter is a thousandth of a liter. The unit itself does not change, only the factor in front of it, which is why the same prefixes work for grams, liters, moles and seconds alike.