It is possible to assign a point on the line to both entire and rational numbers. In other words, we can costruct segments of entire or rational length.
This rises a question: is it possible to do it with irrational numbers? The answer is: Yes.
Given an irrational number of the kind $$\sqrt{a}$$ we can assign it a point on the line by the following procedure:

We express $$a$$ as the sum of two numbers $$b$$ and $$c$$: $$a=b+c$$.

We construct a rectangular triangle which legs have length $$\sqrt{b}$$ and $$\sqrt{c}$$.

We apply the Pythagoras' theorem and we have that the hypotenuse of such triangle has length $$\sqrt{a}$$: $$$H^2=(\sqrt{b})^2+(\sqrt{c})^2$$$ $$$H^2=b+c=a$$$ $$$H=\sqrt{a}$$$
 We translate the length of the hypotenuse with a compass from point $$0$$, and we get the point on the line for the irrational number $$\sqrt{a}$$
We will simplify the process if, when choosing the values $$b$$ and $$c$$ we get perfect squares, so that their roots are integers. Otherwise we will have to iterate the process to graph $$\sqrt{b}$$ and $$\sqrt{c}$$.
To assign a point on the line to number $$\sqrt{2}$$ we draw an isosceles rectangle triangle with legs of length $$1$$.
The hypotenuse of the triangle has a length of $$$H^2=1^2 + 1^2=2 \Rightarrow H=\sqrt{2}$$$
Using a compass we translate this length on the line fixing the needle of the compass on point $$0$$. The point on the line for the irrational number $$\sqrt{2}$$ is where the other top of the compass marks.
We must have drawn a figure as shown:
Up to now, we have drawn segments which length was an irrational number, using a ruler and a compass. The irrational numbers that can be located in the straight line with this process are called drawable. But, there are other irrational numbers that are undrawable: they are called transcendent.
To assign a point on the line to a transcendent irrational number, we need to to know its decimal expression. From this decimal expression, the different rational approximations given by truncation are considered. So, we successively use the rational given by the first decimal number, for the first two ones, the third, the fourth etc. These are the successive decimal approximations by default.
Now, we add a unit to the last decimal digit of the numbers in the sequence. This way, we obtain another sequence, which is the sequence of approximation to the number by excess.
Let's consider the irrational number $$\pi=3,141592654\ldots$$
The rationals that we obtained by truncating $$\pi$$, (taking only the first decimal numbers) are:
$$$3; 3,1; 3,14; 3,141; 3,1415; 3,14159; 3,141592; \ldots \ \ (1) $$$
Let's observe that every number in this succession is bigger than the previous one, but all of them are smaller than $$\pi$$. This is called the sequence of approximation of $$\pi$$ by default.
Adding the unit to the last decimal number of each of them, we obtain:
$$$4; 3,2; 3,15; 3,142; 3,1416; 3,14160; 3,141593; \ldots \ \ (2) $$$
They are all rational numbers, each one smaller than the previous one, but bigger than $$\pi$$. This is called the sequence of approximation of $$\pi$$ by excess.
The number $$\pi$$ is bigger than all the numbers of (1), but smaller than all the numbers of (2). So, the point that we must assign to $$\pi$$ is located a little more on the right of the rational numbers that form (1), and a little more on the left of those forming (2).
Now, we have to introduce a new concept: we will call interval the segment of the straight line between two points, and it is denoted by writing both points, in order, between square brackets.
The interval between points $$3$$ and $$4$$ is written as $$[3,4]$$. It represents the segment of the straight line resulting from joining both points.
Further on with the process of assigning a point of the straight line to an irrational number, we place on the line the rational numbers of the sequences to approximation by excess and by defect.
We consider the intervals which extremes are the pairs of numbers that have homologous positions in both sequences; in other words, the first interval will be the one between the first number of the sequence by default and the first number of the sequence of approximation by excess.
The second interval will be the one between the second terms, the third one is between the third ones, and so on.
Each of these intervals is smaller than the previous one (it is a segment of a line so it has got to be shorter, or it has less length), and to express that each one is contained in the previous one, we say that there are fitted intervals.
Going on with the process of drawing number $$\pi$$, we mark the intervals defined by both sequences (1) and (2), in other words, the segments between $$3$$ and $$4$$; $$3.1$$ and $$3.2$$; $$3.14$$ and $$3.15$$; $$3.141$$ and $$3.142$$, $$\ldots$$ Now, we have the sequence of fitted intervals $$$[3,4]; [3.1,3.2]; [3.14,3.15]; [3.141,3.142]$$$
It is worth mentioning that, when we make the intervals based on the decimal digits of the number to be drawn, we will find as many fitted intervals as there are decimals in the number, this is to say infinite digits, since it is an irrational number.
On the other hand, we also know that this number will be placed in all the intervals because the numbers of the sequence of approximation by default are always smaller, while those of the sequence by excess are always bigger than the irrational number.
Therefore, we have a sequence of intervals, where each number is smaller than the previous one, and contain our irrational number. In fact, this irrational is the only number contained in all the fitted intervals. It is said that the sequence of fitted intervals defines the irrational number.
The sequence of fitted intervals $$$[3,4]; [3.1,3.2]; [3.14,3.15]; [3.141,3.142]; [3.1415,3.1416]; \ldots$$$ defines the irrational number $$$\pi=3,141592654\ldots$$$
Then, if we draw the stated sequence on the line, the point of intersection will be number $$\pi=3,141592654\ldots$$
Since we cannot draw an infinite quantity of intervals, the undrawable irrational numbers cannot be represented on the line with accuracy: we will only be able to delimit the interval where it is located.
However, since we can do these intervals as small as we want, we can find a rational approximation of the number as accurate as we need.