Mostly we use a ruler to measure the length of something.
Always start measuring from 0 on the ruler.
This line is 5 centimetres long.
This line is 8 centimetres long.
This snake is 7 units long.
Is this snake 6 units long? No! Because we started counting from 1, not 0. This snake is really 5 units long.
Which is longer, the pen or the pencil? Well, the pen is 10 centimetres and the pencil is 11 centimetres, so the pencil is longer.