Finding the intersection points between two lines or line segments is what line segment intersection algorithms do.