The lines in the diagram represent the direction of travel of the wave and represent that the waves scatter off of atoms in different locations.

As a preliminary remark, note that the extent of a plane wave is *all of space*. A plane wave is a function that has a value everywhere, not just along a single line. But, we can draw a line to indicate the direction of the wave vector $\vec k$. The wave is said to be "plane" because it has the same value everywhere along a plane perpendicular to the wave vector.

Note also that the lines in the figure presented in the question are drawn in a way to help illustrate the phase difference. The waves do not literally travel only along the lines. The lines indicate the direction of travel and indicate that the total path length for one of the interfering waves is larger than the other.

Generally, if some atom is at position $\vec R_1$ and for example a plane wave $e^{i\vec k \cdot \vec r}$ reflects off of the atom, the outgoing wave is proportional to:
$$
\frac{1}{|\vec r - \vec R_1|}e^{ik|\vec r - \vec R_1|}e^{i\vec k\cdot \vec R_1}
$$



If the same incident plane wave reflects off a different atom at a different location $\vec R_2$ the outgoing wave is proportional to:
$$
\frac{1}{|\vec r - \vec R_2|}e^{ik|\vec r - \vec R_2|}e^{i\vec k \cdot \vec R_2}
$$

There is a phase difference between the waves because the initial plane wave has to travel different distances to get to the different atoms.

In a solid the locations $\vec R_i$ are regularly distributed and cause diffraction patterns. However the expression for the total diffracted wave can be written down for any collection of scatterers at locations $\vec R_i$ as:
$$
\sum_i \frac{1}{|\vec r - \vec R_i|}e^{ik|\vec r - \vec R_i|}e^{i\vec k \cdot \vec R_i}\;,
$$
where the first factor is the outgoing spherical wave (from each scatterer) and the last factor is due to the incoming plane wave having to travel different distances to each scatterer.

We also use the approximation:
$$
|\vec r - \vec R_i| \approx r - \frac{\vec r}{|r|}\cdot\vec R_i\;,
$$
in the exponential of the outgoing spherical wave, which we will see is valid when the final observation location $r$ is very large compared to the distance between scatterers.

And we use the approximation:
$$
|\vec r - \vec R_i| \approx r\;,
$$
in the denominator of the outgoing spherical wave.

For the case of two scatterers we use the above approximation and find the  total wave amplitude at the observation point $\vec r$ to be:
$$
\frac{e^{ikr}}{r}\left(
e^{-ik\hat r\cdot \vec R_1}e^{i\vec k \cdot \vec R_1}
+
e^{-ik\hat r\cdot \vec R_2}e^{i\vec k \cdot \vec R_2}
\right)
$$

And the total phase difference is:
$$
(\vec k - k\hat r)\cdot(\vec R_1 - \vec R_2) = \frac{2\pi}{\lambda}2d\sin(\theta)
$$