A number line is a concept, which can only be represented on paper or displayed as a line of limited length. That length depends on what a particular example of a number line is meant to represent, that is, the range of numbers. Sometimes the range is large, for example, -100 to 100. So the line will be divided into intervals according to the width of the page or display. Sometimes the range is very small like -1 to 1, so the line will be divided into segments representing fractions like ⅛, for example, or decimals like 0.01 (one hundredths).
If you hold in mind a number line of infinite length, that is, a concept of a number line, you can divide the line mentally into whatever intervals you choose. It all depends on the problem you're trying to solve using a number line. Then you simply draw the line to help you visualise your concept better.