I have a set of lines. One line is defined by two Points. A Point has (x,y) coordinates.
Some lines are only connected with others in one Point. The set of lines defines a map. You can see an example in the Image below. Now let’s assume I want to go from one Point on any line Segment (not just the endpoints of a line) to another Point on another line.
Background: While moving from one Point to another I want to paint a line along the way, so in the end, only the traveled paths will be painted. Think of it as a heatmap for paths. What algorithm would I use? Are there any libraries I can use?

Representing a graph as set of lines with x-y cooridinates is not suitable for path finding algorithms so you should build proper graph from your set of line segments.
I think you could use these formulas:
http://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line
http://en.wikipedia.org/wiki/Line-line_intersection
for determining for each line segment it’s adjacent line segments. Eeach intersection of two lines should be converted to four or three lines, so that they were connected only by ending points.
After building a graph where each node represents a line and each edge represents connections between lines you can use Dijkstra algorithm for finding shortest path between any pair of nodes (lines):
http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm