When you draw a new line, all you have to do is move it over the existing line so that it is outlined in red. When you click, the new line snaps into the old one.

image

Alternatively, you can set a new point in the existing line (blue line in my case), at the place where the new one should snap in. And then you mark the two points (red) and press the keyboard key M.
image

After that it should look like this:
image